|
Posted by Jeff North on 06/14/07 10:58
On Wed, 13 Jun 2007 09:18:52 -0700, in comp.lang.php vinnie
<centro.gamma@gmail.com>
<1181751532.086784.293800@o11g2000prd.googlegroups.com> wrote:
>| this is my include file that i have uploaded on the server called
>| DB_1.php
>|
>| <?php
>| function connect()
>| {
>| // SERVER connection
>| $con=mysql_connect('host', 'My_user_ID', 'My_Pwd');
>| // DB selection
>| $sql=mysql_select_db('Database_name');
>| }
>| ?>
>|
>| when i point my browser to www.yyyyyy.com/insert_form.html and i
>| submit the form, it recalls the follwing file:
Rename www.yyyyyy.com/insert_form.html to
www.yyyyyy.com/insert_form.php then the web server will process your
page. At present, because of the extension, the web server isn't
looking at your file to see if it needs to anything with the files'
contents.
>| <?php
>| include ("DB_1.php");
>| // connect();
>| $query_table="insert into table_name values('$_POST[nome]',
>| '$_POST[cognome]','$_POST[indirizzo]', '$_POST[telefono]',
>| '$_POST[cell]','$_POST[email]')";
>| $insert=mysql_query($query_table) or die(mysql_error());
>| if (mysql_query($query_table, $con))
>| {
>| header ("Location: http://www.yyyyyy.com/thanks.html");
>| exit;
>| }
>| else
>| {
>| echo '<br>something went wrong<br>';
>| }
>| ?>
>|
>| nothing happens, and no record are added to my database. Why? What
>| should i change?
---------------------------------------------------------------
jnorthau@yourpantsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------
[Back to original message]
|