On Mon, 29 Apr 2002, Richard Baskett wrote:
> Well you don't have an curly braces anywhere in your code..
> 
> Try this:
> 
> <?php
> 
> If (($_POST['fname']=="") || ($_POST['lname']=="") {
>     echo("Please Enter Information In All The Fields !!!"); }
> Else {
>     $connectionString=odbc_connect("PHPInsert","sa","");
>     $query="INSERT INTO PHPUsers(FName,LName) VALUES
>         ($_POST['fname'],$_POST['lname'])";
>     $exeQuery=odbc_do($connectionString,$query);
>     odbc_close($connectionString);
> 
>     echo("Hi ",$_POST['fname'],"&nbsp;",$_POST['lname'],"Thank You For
> Registering !!!");
> }
> 
> ?>

He needs a few more curly braces. The $query assignment should be 
something like this:

  $query="INSERT INTO PHPUsers(FName,LName) VALUES
     ({$_POST['fname']},{$_POST['lname']})";

miguel


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

Reply via email to