Re: HELP ME NEW FRIENDS....
| From: | Mike Mannakee | Date: | Thu, 27 Mar 2003 01:00:54 +0000 |
| Subject: | Re: HELP ME NEW FRIENDS.... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-141147@lists.php.net to get a copy of this message | ||
Simple example here.
You have a page that submits to your php script. The form on the page is
coded like this:
<form action="script.php" method="get">
<input type="text" name="variable1">
<input type="Submit">
</form>
This, when used, submits to your script, which will have code something like
this:
<?
$var = $HTTP_GET_VARS['variable1'];
if(!$link = (code to connect to your database, typically mysql))
{ die("Cannot connect to database"); }
$sql = "INSERT INTO table values('$var')";
if(!$result = mysql_query($sql))
{ die("Cannot insert data"); }
etc.
HTH
Mike
"Hector Huaranga Segales" <hhuarangas@tp.com.pe> wrote in message
news:OF719DFB0D.7EA6C3AC-ON05256CF5.0078BE97@int.tp.com.pe...
> HI
>
> my English is no too god ...but
>
> i need information about forms with PHP, data base query, i need examples
> plz...
>
> thanks in advanced