Wednesday, 15 August 2012

php - Form result save into different table columns -



php - Form result save into different table columns -

i want know if possible using php/mysql:

i'm trying create chatroom php , here's how want it

i come in text, "hello" , saves variable1 while beingness set database table chatlines chatline1 then else come in "what's up?" (from same form), save variable2 , save database table chatlines chatline2 i come in more text, "nothing much failing @ coding" , saves variable3 while beingness set database table chatlines chatline3

from knowledge, forms can save 1 variable @ time (the submitted text) :/

even if possible, too

display 3 variables it'd this

me: hello other person: what's up? me: nil much failing @ coding

but if creates 4th variable saying "yo", saves on variable3, 3 saves on 2 , 2 saves on 1 this:

other person: what's up? me: nil much failing @ coding 2nd other person: yo

it logical php have capabilities? (sorry bullet points)

edit

i'm pretty sure can sec part..

echo $variable1; echo $variable2; echo $variable3;

and like

if ($variable4 != ''){ $variable3 = $variable4 $variable2 = $variable3 $variable1 = $variable2 }

would work?

php

No comments:

Post a Comment