Re: Solution

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Karl

Thanks for the reply, I copied your code and it did not work, tried a few 
variations and same result.

Gary
"Karl DeSaulniers" <karl@xxxxxxxxxxxxxxx> wrote in message 
news:E56BE001-63F6-4DF1-8C72-AD468C23EBBE@xxxxxxxxxxxxxxxxxx
> Hey Gary, instead try something like this maybe?
>
>
> $dbc=mysqli_connect('localhost','root','','test') or die('Error 
> connecting to MySQL server');
>
> $query_name="INSERT INTO name(fname='$fname', lname='$lname')";
> $query_address="INSERT INTO address (street='$street', town='$town', 
> state='$state', zip='$zip')";
>
> $result1=mysqli_query($dbc, $query_name) or die('Error querying  database 
> for name.');
>
> $result2=mysqli_query($dbc, $query_address) or die('Error querying 
> database for address.');
>
> echo "Success!<br />";
>
> ?>
>
> HTH,
>
> Karl
>
>
> On Apr 12, 2010, at 5:16 PM, Peter Lind wrote:
>
>> $dbc=mysqli_connect('localhost','root','','test')or die('Error 
>> connecting to
>> MySQL server');
>>
>> $query="INSERT INTO name(fname, lname)"."VALUES('$fname','$lname')";
>>
>> $result=mysqli_query($dbc, $query)
>> or die('Error querying database.');
>>
>> mysqli_close($dbc);
>> ?>
>>
>> <?php
>>
>> $dbc=mysqli_connect('localhost','root','','test')or die('Error 
>> connecting to
>> MySQL server');
>> $query="INSERT INTO address (street, town, state,
>> zip)"."VALUES('$street','$town','$state','$zip')";
>>
>> $result=mysqli_query($dbc, $query)
>> or die('Error querying database.');
>>
>> mysqli_close($dbc);
>>
>> ?>
>
> Karl DeSaulniers
> Design Drumm
> http://designdrumm.com
>
>
> __________ Information from ESET Smart Security, version of virus 
> signature database 5023 (20100412) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>
> 



__________ Information from ESET Smart Security, version of virus signature database 5026 (20100413) __________

The message was checked by ESET Smart Security.

http://www.eset.com





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux