<head>
<script type="text/javascript">
function delayer(){window.location.href="http://northwesternaires.org/index.php?id=4";}
</script></head>
<body onLoad="setTimeout('delayer()', 3000)">
<?php
$firstname=$_POST['firstname'];
$lastname=$_POST['lastname'];
$email=$_POST['email'];
$host = "***********"; // Your database host
$user = "**********"; // Your database username
$pass = "*********"; // Your database password
$data = "********"; // The name of your database
mysql_connect($host,$user,$pass) or die("<b>Error:</b> Database connection failed.");
mysql_select_db($data) or die("<b>Error:</b> Database connection failed.");
// MySQL Insert a row of information into the table "members"
mysql_query("INSERT INTO memberlist (firstname, lastname, email) VALUES ('$firstname', '$lastname', '$email')")
or die ("Information was not submitted");
Print "Your information has been successfully added to the database.";
?>
</body>
Function Problem
Started by Joe, Nov 18 2008 06:56 AM
2 replies to this topic
#1
Posted 18 November 2008 - 06:56 AM
Well This page is what my form submits to in order to store things in a database he problem is that for some reason this page isn't transfering back to the page I specified in fact it doesn't transfer at all.... anyone have any reasons for it because if not it will make a lot of time consuming submitting... Thanks
joemeyer@exchangecore.com
Any requests for designs,scripts or web-hosting please visit our Client Center.
Thank you for supporting ExchangeCore!
Any requests for designs,scripts or web-hosting please visit our Client Center.
Thank you for supporting ExchangeCore!
#2
Posted 10 December 2008 - 09:06 AM
Joe, on Nov 18 2008, 12:56 PM, said:
Well This page is what my form submits to in order to store things in a database he problem is that... Thanks
<head>
<script type="text/javascript">
function delayer(){window.location.href="http://northwesternaires.org/index.php?id=4";}
...
?>
</body>the problem is inside the form.
1? the form must be method="post"
2? the page it goes must be:action="*.php" (*.php must the the url to your site)
forming
<form method="post" action="*.php">
Before the form that will be filled by the user.
Without any more info I can't help you more.
oh and don't forget the
</form>
#3
Posted 15 May 2009 - 01:26 PM
it was actually just an problem including that file with my php, not really anything else but when it was included it didn't recognize that it changed pages or something so it didn't run the script. Made a new url and it worked like a champ :S
joemeyer@exchangecore.com
Any requests for designs,scripts or web-hosting please visit our Client Center.
Thank you for supporting ExchangeCore!
Any requests for designs,scripts or web-hosting please visit our Client Center.
Thank you for supporting ExchangeCore!
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users




This topic is locked









