Hi Payne

for starters your missing an ? at the last echo
<? echo $l_name>

secondly I would rewrite the sql statement to read
$sql = "INSERT INTO $table_name
         (leads_id, title, f_name, l_name)
         VALUES
         (' ".$leads_id." ', ' ".$title." ', ' ".$f_name." ', ' ".$l_name."
');";


but the statement itself shouldnt cause a problem either way.

I am wondering where leads_id comes from however.. is it an auto number?


and finally your processing form is called addlead.php
and the form is posting to a form called addleads.php

hope this helps

chris
<-- snip -->
From: "Payne" <[EMAIL PROTECTED]>
> I am working a form to pass information from it to mysql data.  I am
> able to connect to the database. But nothing is being pass from the form
> to the php page.  This is my php code...
> ---------------------form.html--------------------------------------------
--------
> <html>
> <head>
>     <title>Untitled</title>
> </style>
> </head>
> <body>
> <form name="form1" method="post" action="addlead.php">
> <input name="title" type="text" size="40">
> <input name="f_name" type="text" size="40">
> <input name="l_name" type="text" size="40">
> <input type="submit" name="Submit" value="Submit Information">
> </form>
> </body>
> </html>
> --------------------------addleads.php------------------------------------
------
> <?
>
> include("./config.php");
>
> $sql = "INSERT INTO $table_name
>         (leads_id, title, f_name, l_name)
>         VALUES
>         ('$leads_id', \"$title\", \"$f_name\", \"$l_name\")";
>
> //debug tool
>
> print $sql;
>
> $result = mysql_query($sql, $connection) or
>     die ("Couldn't execute query.");
>
> ?>
> <html>
> <head>
>     <title>Untitled</title>
>
> </style>
> </head>
>
> <body>
> <? echo $title ?>
> <br>
> <? echo $f_name ?>
> <br>
>  <? echo $l_name>
>
> --------------------------------------------------------------------------
---------
>
> What I am getting this....
>
> INSERT INTO leads (leads_id, title, f_name, l_name) VALUES ('', "", "",
"")
>
> *Salutation*
> *First Name*
> *Last Name*
<-- snip -->

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

Reply via email to