Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Creative Discussion > Programming and Game Development

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 05-03-2012, 07:25 PM
AlexC's Avatar
AlexC AlexC is offline
Moderator
 
Join Date: Dec 2009
Location: Canada
Posts: 753
Gender: Unknown/Other
Credits: 66,330
AlexC is an unknown quantity at this point
Default Insert Data/Tables Trouble

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);
?>
This is my submitting page - I think its alright. I just need some help setting up a table to hold the data. Help please?
__________________
Reply With Quote
  #2  
Old 05-03-2012, 07:40 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 81,207
SilverDragonTears is on a distinguished road
Default

I can help you... skype?
__________________

Check out SilvaTales
Reply With Quote
  #3  
Old 05-03-2012, 07:44 PM
AlexC's Avatar
AlexC AlexC is offline
Moderator
 
Join Date: Dec 2009
Location: Canada
Posts: 753
Gender: Unknown/Other
Credits: 66,330
AlexC is an unknown quantity at this point
Default

I guess, sure.
__________________
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT -5. The time now is 07:38 AM.

Currently Active Users: 454 (0 members and 454 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636