Forum Moderators: coopster
try this:
$query1 = "insert into users (username) VALUES ('".$uname."')";
$result1 = mysql_query($query1);
$query2 = "insert into orders (username) VALUES ('".$uname."')";
$result2 = mysql_query($query2);
$query3 = "insert into requests (username) VALUES ('".$uname."')";
$result3 = mysql_query($query3);
u have to check if submissions of data are correct
i.e
if (!$query3)
{
echo 'error';
}
else
{
echo 'ok';
}
That is, can I combine the two seperate statements below into one line?
$query1 = "insert into table1 (uname,attempt1) VALUES ('".$uname."','1')";
$result1 = mysql_query($query1);
$query2 = "insert into table1 (uname,attempt2) VALUES ('".$uname."','2')";
$result2 = mysql_query($query2);
$i=1
while ($i=2)
{
$query1 = "insert into table($i) (uname,attempt($i)) VALUES ('".$uname."','$i')";
$result1 = mysql_query($query1);
}
$i++
u gotta search the syntax to make it work....dont konw if this is exatly what u want...