AW: [PHP] how to insert form data // BigMark
| From: | Shahed, Raja | Date: | Thu, 03 Jun 2004 07:14:17 +0000 |
| Subject: | AW: [PHP] how to insert form data // BigMark | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-187508@lists.php.net to get a copy of this message | ||
BigMark wrote
$sql = "INSERT INTO whosaid (name,quote) VALUES ('$name', '$quote')";
//$sql = "INSERT INTO whosaid (name,quote) VALUES ('','$name',
'$quote')";
//if you have auto_incrementing id
$result = mysql_qeury($sql);
Try this way!
Best regards
Raja shahed
>-----Ursprüngliche Nachricht-----
>Von: BigMark [mailto:neretlis@westnet.com.au]
>Gesendet: Donnerstag, 3. Juni 2004 05:13
>An: php-general@lists.php.net
>Betreff: [PHP] how to insert form data
>
>
>I am trying to learn how to take the value of $name and $quote
>from a form
>and put it in the database -whosaid
>but obviuosly i have it all wrong. Can anyone point out what
>im doing wrong.
>
>thx in advance
>
>
><?php
>include("connect.php");
>$name = $_POST['name'];
>$quote = $_POST['quote'];
>$sql = "INSERT INTO whosaid values (name='$name',quote='$quote');
>?>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
> raja @christine nothdurfter . it
>