GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 17-Feb-2009, 21:47
enigma90 enigma90 is offline
New Member
 
Join Date: Feb 2009
Posts: 2
enigma90 is on a distinguished road

HTML forms and MySQL database


Hi there,

Basically needing some major help with submitting a html form data to a mysql database. This is the form (link) (www.blackstone.trigguh.net) and this is how I'd like it to be displayed: (www.blackstone.trigguh.net) (password is ralphita [dont worry, the password isn't anything important])

Is there anyone out there who is able to code this up for me so that upon clicking submit it goes to my mysql database? I heard it was relatively easy but I can't do it for the life of me!

Cheers!
  #2  
Old 18-Feb-2009, 20:05
TurboPT's Avatar
TurboPT TurboPT is offline
Senior Member
 
Join Date: Feb 2006
Location: Atlanta, GA
Posts: 1,140
TurboPT is a jewel in the roughTurboPT is a jewel in the roughTurboPT is a jewel in the rough

Re: HTML forms and MySQL database


How exactly are you making the db and query calls?

Can you post some code? (make sure to ***** any user/pass info., if needed)
__________________
Use the force...read the source!!
WYCIWYG -- what you code is what you get!
  #3  
Old 18-Feb-2009, 22:06
enigma90 enigma90 is offline
New Member
 
Join Date: Feb 2009
Posts: 2
enigma90 is on a distinguished road

Re: HTML forms and MySQL database


This is the HTML code... to be completely honest I have no php code or mysql code because I'm actually wondering HOW I would code it.

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Blackstone Society - Membership Form 2009</title> <link href="style.css" rel="stylesheet" type="text/css" /> </head> <body> <form id="form1" name="form1" method="post" action="process.php"> <table width="800" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><div align="right"><img src="images/logo.png" alt="Blackstone Society" /></div></td> </tr> <tr> <td><div align="center" class="title"> <h1> Membership Form - 2009 <br /> </h1> </div></td> </tr> <tr> <td><h2>Personal Details</h2> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="50%" valign="top">First Name: <input name="firstname" type="text" id="firstname" size="50" /> <p>Last Name: <input name="lastname" type="text" id="lastname" size="50" /> </p></td> <td width="50%" valign="top"><p>Gender: <select name="gender" id="gender"> <option value="1" selected="selected">Male</option> <option value="0">Female</option> </select> </p> <p>Date of Birth: <select name="dobDay" id="dobDay"> <option value="1" selected="selected">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> <option value="13">13</option> <option value="14">14</option> <option value="15">15</option> <option value="16">16</option> <option value="17">17</option> <option value="18">18</option> <option value="19">19</option> <option value="20">20</option> <option value="21">21</option> <option value="22">22</option> <option value="23">23</option> <option value="24">24</option> <option value="25">25</option> <option value="26">26</option> <option value="27">27</option> <option value="28">28</option> <option value="29">29</option> <option value="30">30</option> <option value="31">31</option> </select> <select name="dobMonth" id="dobMonth"> <option value="1" selected="selected">January</option> <option value="2">February</option> <option value="3">March</option> <option value="4">April</option> <option value="5">May</option> <option value="6">June</option> <option value="7">July</option> <option value="8">August</option> <option value="9">September</option> <option value="10">October</option> <option value="11">November</option> <option value="12">December</option> </select> <input name="dobYear" type="text" id="dobYear" size="10" maxlength="4" /> </p></td> </tr> </table></td> </tr> <tr> <td><h2>Contact Details</h2> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="50%" valign="top">Postal Address: <br /> <br /> <input name="address1" type="text" id="address1" size="50" /> <br /> <br /> <input name="address2" type="text" id="address2" size="50" /> <p>Suburb: <input name="suburb" type="text" id="suburb" size="40" /> </p> <p>State: <input name="state" type="text" id="state" size="15" /> Postcode: <input name="postcode" type="text" id="postcode" size="4" /> </p></td> <td width="50%" valign="top"><p>Mobile Phone: <input name="mobilephone" type="text" id="mobilephone" size="40" /> <br /> <br /> Other Phone: <input name="otherphone" type="text" id="otherphone" size="40" /> <br /> <br /> Email Address: <input name="email" type="text" id="email" size="40" /> <br /> </p> <p>&nbsp;</p></td> </tr> </table></td> </tr> <tr> <td><h2>Study Details</h2> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="50%" valign="top">Student number (8 digits): <input name="studentnumber" type="text" id="address6" size="15" maxlength="8" /> <br /> <br /> <p>Course of study: <input name="course" type="text" id="course" size="40" /> </p> <p>Year of Study (Fresher-12th): <input name="studyyear" type="text" id="studyyear" size="15" maxlength="4" /> </p> <p>Guild member: <select name="guild" id="guild"> <option value="1" selected="selected">Yes</option> <option value="2">No</option> </p></td> <td width="50%" valign="top"><p>Amenities and Service Fee: <select name="amenities" id="amenities"> <option value="1" selected="selected">Yes</option> <option value="2">No</option> <br /> </p></td> </tr> </table></td> </tr> <tr> <td><h2>Sports</h2> <p>Blackstone holds many sporting events throughout semester one and two. Please indicate which sporting activities (if any) you enjoy and/or would participate in throughout the year by checking the relevant boxes below. </p> <table width="46%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="27%">Athletics:</td> <td width="30%"><input name="chkAthletics" type="checkbox" id="chkAthletics" value="1" /></td> <td width="31%">AFL:</td> <td width="12%"><input name="chkAFL" type="checkbox" id="chkAFL" value="1" /></td> </tr> <tr> <td>Cricket:</td> <td><input name="chkCricket" type="checkbox" id="chkCricket" value="1" /></td> <td>Soccer:</td> <td><input name="chkSoccer" type="checkbox" id="chkSoccer" value="1" /></td> </tr> <tr> <td>Hockey:</td> <td><input name="chkHockey" type="checkbox" id="chkHockey" value="1" /></td> <td>Netball:</td> <td><input name="chkNetball" type="checkbox" id="chkNetball" value="1" /></td> </tr> <tr> <td>Softball:</td> <td><input name="chkSoftball" type="checkbox" id="chkSoftball" value="1" /></td> <td>Squash:</td> <td><input name="chkSquash" type="checkbox" id="chkSquash" value="1" /></td> </tr> <tr> <td>Table Tennis:</td> <td><input name="chkTableTennis" type="checkbox" id="chkTableTennis" value="1" /></td> <td>Tennis:</td> <td><input name="chkTennis" type="checkbox" id="chkTennis" value="1" /></td> </tr> <tr> <td>Touch Rugby:</td> <td><input name="chkTouchRugby" type="checkbox" id="chkTouchRugby" value="1" /></td> <td>Frisbee:</td> <td><input name="chkFrisbee" type="checkbox" id="chkFrisbee" /></td> </tr> <tr> <td>Volleyball:</td> <td><input name="chkVolleyball" type="checkbox" id="chkVolleyball" value="1" /></td> <td>&nbsp;</td> <td></td> </tr> </table> <p>&nbsp;</p></td> </tr> <tr> <td><div align="center"> <p>If you have completed the form, please click the button below. </p> <p>You will be taken to a screen to confirm the information you have supplied is accurate. Please press submit only once.</p> <p> <input type="submit" name="submit" id="submit" value="Submit" /> </p> </div></td> </tr> </table> </form> </body> </html>
  #4  
Old 19-Feb-2009, 05:31
TurboPT's Avatar
TurboPT TurboPT is offline
Senior Member
 
Join Date: Feb 2006
Location: Atlanta, GA
Posts: 1,140
TurboPT is a jewel in the roughTurboPT is a jewel in the roughTurboPT is a jewel in the rough

Re: HTML forms and MySQL database


Do you have a database [with tables] ready to hold your data? You will need to know the MySQL connection parameters.

What is the process.php file...is that where your posted code is located, or is it some other file that will do the processing?

In the meantime, have a look at this for a basic connection example using PHP.
__________________
Use the force...read the source!!
WYCIWYG -- what you code is what you get!
 
 

Recent GIDBlogAccepted for Ph.D. program by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create a MYSQL Database with a HTML form? kevin433 MySQL / PHP Forum 19 17-Jul-2008 22:00
Cannot pass data between forms with enctype="multipart/form-data" attribute MisterJingo MySQL / PHP Forum 0 05-Aug-2005 05:40

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 18:51.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.