Two php pages and a single column
| From: | sannec27 at eng dot uab dot edu | Date: | Sun, 12 Nov 2000 04:53:21 +0000 |
| Subject: | Two php pages and a single column | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-24835@lists.php.net to get a copy of this message | ||
Hello all,
I am having two different php pages(scene1.php and scene2.php) and in the
first page i am collecting the 'firstname' and in the second page i am
collecting the 'lastname' and i am using the following queries respectively
in those two php pages:
mysql_query ("insert into usertable (firstname) values ($firstname)");
mysql_query ("insert into usertable (lastname) values ($lastname)");
What my problem is, i want these two details to be in the same row not in
two different rows as that is the case now as shown below:
--------------------------
firstname |lastname
--------------------------
john | null
--------------------------
null | deo
--------------------------
I want it to be as below:
--------------------------
firstname |lastname
--------------------------
john | deo
--------------------------
As i don't have the idea about who is going to be the user i am not able to
use a command like this in the second page:
mysql_query ("insert into usertable (lastname) values ($lastname) where
firstname='john'");
Can any body suggest me how to get around this problem. Does MySQL and PHP
entertain this feature?
I very much appreciate whomever responds
Chakravarthy K Sannedhi