![]() |
|
#1
|
||||
|
||||
|
So somedays I'm a total noob with coding. I need to have someone enter info into a form, have the info put into a database, and then I'll pull it and display it.
I have the form done (I think) and the pulling part I /think/ I'm good with. I'm having trouble getting the info into the table though. Mostly because I don't know how to set up a table. Code:
<?php
$con = mysql_connect("localhost","gloometh_me","**********"); //Replace with your actual MySQL DB Username and Password
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("gloometh_adopts", $con);
$code=mysql_real_escape_string($_POST['code']);
$sql="INSERT INTO clicks (code) VALUES ('$code')";
if (!mysql_query($sql,$con)) {
die('Error: ' . mysql_error());
}
echo "The form data was successfully added to your database.";
mysql_close($con);
?>
__________________
|
|
#2
|
||||
|
||||
|
I can help you... skype?
|
|
#3
|
||||
|
||||
|
I guess, sure.
__________________
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| insert flash / .swf files | voni | Questions and Supports | 7 | 06-15-2014 10:55 AM |
| Where is the data for the Loginbar located? | Infernette | Questions and Supports | 6 | 12-18-2013 04:53 AM |
| Insert Issue | SilverDragonTears | Questions and Supports | 4 | 02-12-2013 06:38 AM |
| Pendrive data recover | SleepWalker | Other Chat | 1 | 11-02-2009 12:28 AM |
| i can,t insert information please help me. | reza01 | Questions and Supports | 1 | 06-20-2009 09:20 AM |
What's New? |
What's Hot? |
What's Popular? |