Re: how to insert form data

From: Date: Wed, 02 Jun 2004 11:23:49 +0000
Subject: Re: how to insert form data
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-187439@lists.php.net to get a copy of this message
<?php include("connect.php"); $name = $_POST['name']; $quote = $_POST['quote']; $sql = mysql_query("INSERT INTO whosaid (name,quote) VALUES ('" . $name . "','" . $quote . "')"); ?> HTH Craig "Bigmark" <neretlis@westnet.com.au> wrote in message news:20040602111454.2692.qmail@pb1.pair.com... > 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'); > ?>

« previous php.general (#187439) next »