hay zues
try this
insert into table values (" . $first. ",
" . $last. " );
hope this works .....
good luck
toby ......
--- zeus <[EMAIL PROTECTED]> wrote: > I make
register golbals on, but it doesn't solve the
> problems. The wird
> thing is, i am using php nuke in my localhost, it
> can enter datas into
> MySQL, the form and the script it's not diffrent
> than mine right
> (phpnuke more complex). The form it self don't have
> any errors?? and how
> about the PHP script?? is there any error?
>
> I need explanation in english please..please..
> because i am still new in
> php.
>
>
>
> Dash McElroy wrote:
>
> >Oh - you might want to check your register_globals
> item in php.ini and set
> >it to on (look at www.php.net/register_globals) or
> use $_GET['varname'] for
> >GET, $_POST['varname'] for POST, or
> $_REQUEST['varname'] for Get/Post/Cookie
> >(works for any of those).
> >
> >-Dash
> >
> >-----Original Message-----
> >From: zeus [mailto:[EMAIL PROTECTED]]
> >Sent: Saturday, November 16, 2002 8:49 AM
> >To: phpwin
> >Subject: [PHP-WIN] problem insert data into mysql
> >
> >
> >I make this script. I have a problem, the data
> entered in the form wont
> >insert into MYSQL, the database added new row but
> with blank database.
> >Is there something wrong with the script? because i
> install phpnuke and
> >i can added new data into mysql.
> >Thanks, i need solve this problem A.S.A.P, with
> your kind help o PHP-er....
> >
> >Thanks..
> >
> >using
> >PHP 4.2
> >Apache 1.3
> >========================code===================
> ><form action="insert.php" method="post">
> >First Name: <input type="text" name="first"><br>
> >Last Name: <input type="text" name="last"><br>
> >Phone: <input type="text" name="phone"><br>
> >Mobile: <input type="text" name="mobile"><br>
> >Fax: <input type="text" name="fax"><br>
> >E-mail: <input type="text" name="email"><br>
> >Web: <input type="text" name="web"><br>
> ><input type="Submit">
> ></form>
> ><?PHP
> >$username="root";
> >$password="";
> >$database="belajarPHP";
> >mysql_connect(localhost,$username,$password);
> >@mysql_select_db($database) or die( "Unable to
> select database");
> >$query = "INSERT INTO contacts VALUES
>
>('','$first','$last','$phone','$mobile','$fax','$email','$web')";
> >mysql_query($query);
> >mysql_close();
> >
> >
> >?>
> >
> >
> >
> >
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php