Jump to content

Welcome Guest to Geeks to Go - Register now for FREE
Geeks To Go is a helpful hub, where thousands of friendly volunteers serve up answers and support. Get free advice from the experts. Feel free to browse the site as a guest. However, you must log in to reply to existing topics or start a new topic of your own, and enjoy all this forum has to offer. Additionally, if you can assist another member by sharing your knowledge, please post a reply! Best of all - Registration and all assistance, is FREE! Learn more about How it Works. Infected? Malware Cleaning Guide. What are you waiting for?
Create an Account Login to Account

Adding details to my database

  • Please log in to reply




  • Member
  • PipPip
  • 40 posts

Im having a but of a nightmare here and need help before i breakdown :)

Ive made a simple web form on my site so customers can fill out there details, when the submit button is clicked a php script should send these details to my MySql database.

This isnt happening. Instead all i see in my phpMyadmin is "ARRAY | ARRAY | ARRAY" where the details should be?

This is my html form code:

<form method="post" action="sendform.php">
Your Name:<br />
<input type="text" name="name[]" /><br />
Email Address:<br />
<input type="text" name="email[]" /><br />
Your Product (graphics/tinting/printed clothing:<br />
<input type="text" name="product[]" /><br />
Short Description Of Product And Any Questions/Comments:<br />
<textarea name="message[]" rows="10" cols="40"></textarea><br />
<input name="Send it!" type="submit" id="Send it!" value="Send it!" />

This is the php script (sendform.php):


$user_name = "handy";
$password = "*****";
$database = "database2";
$server = "handygraphicscouk.ipagemysql.com";
$db_handle = mysql_connect($server, $user_name, $password);
$db_found = mysql_select_db($database, $db_handle);

if ($db_found) {

$SQL = "INSERT INTO Customers (name, email, product, message)
VALUES ('" .$name. "', '" .$email. "', '" .$product. "', '" .$message. "' )";
$result = mysql_query($SQL);


print "Records added to the database";
else {
print "Database NOT Found ";


I tested this by typing in "test" in each textbox on my web form and all i get returned is "Array" for each section?

I also would like the user to be re-directed back to a thankyou page but ill sort that out at a later date until this problem is solved?

If you need any more information let me know.

Any help or suggestions with this would be massivley welcomed. Please help!!

Many thanks

  • 0


Similar Topics: Adding details to my database     x

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On: