On Tuesday 14 May 2002 18:38, City Colleges of Chicago - Mannheim wrote:
> I am getting a parse error on line 75. I am trying to say:
>
> if there is a booktitle and a quantity chosen, then go to that booktitle
> and adjust the quantity in the database.
if ($booktitle AND $quantity) { ...
> <?php
> $user = "adminer";
> $pass = "hoosiers";
> $db = "Book Store1";
> $local = "jolinux";
> $link = mysql_connect( "$local", $user, $pass );
> if (! $link )
> die ( "Couldn't open the database" );
> mysql_select_db( $db, $link )
> or die ( "Couldn't open the $db: ".mysql_error() );
>
> if ($submit){
> if( $booktitle, "quantity" ){
> $sql = "UPDATE Book2 SET stock ='$stock-quantity' WHERE
> booktitle=$booktitle AND quantity=quantity";
> }
> // $result = mysql_query($mysql);
> }else if(!$submit){
> echo "Your order has not been placed.<p>";
> }
> ?>
> </BODY>
> </HTML>
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
"All we are given is possibilities -- to make ourselves one thing or another."
-- Ortega y Gasset
*/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php