Reply
Have Form call MySql Database
Old 11-23-2004, 08:54 PM Have Form call MySql Database
amw_drizz's Avatar
Ultra Talker

Posts: 301
Name: Jon
Location: New York
Hello,

i am creating a form for custom compters on my website and i would the form to call the information from a mysql database. Any Help.

Thanks
__________________
AMW_Drizz
Php 5.2 Mysql 4.1 IIS 6 Win2k3 Server && PHP 5.2 MySQL 4.1 Apache 2.2 (separate machine of course)
amw_drizz is offline
Reply With Quote
View Public Profile Visit amw_drizz's homepage!
 
When You Register, These Ads Go Away!
Old 11-23-2004, 08:55 PM
Republikin's Avatar
Super Moderator

Posts: 3,191
http://www.freewebmasterhelp.com/tutorials/phpmysql/1

Without more specific information I can't be less vague than that.
Republikin is offline
Reply With Quote
View Public Profile
 
Old 11-23-2004, 09:02 PM
amw_drizz's Avatar
Ultra Talker

Posts: 301
Name: Jon
Location: New York
here is the current script
PHP Code:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Custom Built Computers</title>
</head>

<body>
<?php
    
include ('http://jonspcrepair.com/inc/header.html');
?>
<body>
<form action="form-2-mail.php" method="post">
<p>&nbsp;</p>
<table width="295" height="80" border="0" bgcolor="#FFFFFF" id="1">
  <tr>
    <td width="93">First Name:</td>
    <td width="186"><input type="text" name="firstname"></td>
  </tr>
  <tr>
    <td>Last Name :</td>
    <td><input type="text" name="lastnamename"></td>
  </tr>
  <tr>
    <td>E-Mail:</td>
    <td><input type="text" name="email"></td>
  </tr>
</table>
<hr>
<p>Now the Custom Computer Information</p>
<table width="989" height="360" border="0">
                  <tr>
                    <td width="132">Mainboard: </td>
                    <td width="217"><input type="Radio" name="Mainboard" value="1" checked>
BioStar M7NCD Ultra</td>
                    <td width="202"><input type="Radio" name="Mainboard" value="2">
BioStar M7NCD</td>
                    <td width="199"><input type="Radio" name="Mainboard" value="3">
Top of the Line Asus</td>
                    <td width="115">&nbsp;</td>
                    <td width="84">&nbsp;</td>
                  </tr>
                  <tr>
                    <td>Video Card: </td>
                    <td><input type="Radio" name="VC" value="1" checked>
ATI RADEON X800 Series </td>
                    <td><input type="Radio" name="VC" value="2">
ATI RADEON 9800 XLT</td>
                    <td><input type="Radio" name="VC" value="3">
Top of the Line Nvida Card</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                  </tr>
                  <tr>
                    <td height="41">Memory:</td>
                    <td><input type="Radio" name="MEMORY" value="128 DDR">
128 DDR </td>
                    <td><input type="Radio" name="MEMORY" value="256 DDR">
256 DDR </td>
                    <td><input type="Radio" name="MEMORY" value="512 DDR">
512 DDR </td>
                    <td><input type="Radio" name="MEMORY" value="1 Gig DDR" checked>
1 Gig DDR </td>
                    <td><input type="Radio" name="MEMORY" value="2 Gig DDR">
2 Gig DDR</td>
                  </tr>
                  <tr>
                    <td>Hard Drive: </td>
                    <td><input type="CHECKBOX" name="HD" value="40g">
40 Gig 72000RPM </td>
                    <td><input type="CHECKBOX" name="HD" value="60g">
60 Gig 7200 RPM</td>
                    <td><input type="CHECKBOX" name="HD" value="74r" checked>
74 gig WD Raptor</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                  </tr>
                  <tr>
                    <td>How Many?</td>
                    <td><input type="RADIO" name="hda" value="1" checked>
5 </td>
                    <td><input type="RADIO" name="hda" value="2">
2 </td>
                    <td><input type="RADIO" name="hda" value="3">
3 </td>
                    <td><input type="RADIO" name="hda" value="4">
4</td>
                    <td>&nbsp;</td>
                  </tr>
                  <tr>
                    <td>Optical Drives: </td>
                    <td><input type="RADIO" name="optical" value="1" checked>
CDRW/DVD (2 Drives) </td>
                    <td><input type="RADIO" name="optical" value="2">
DVDRW </td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                  </tr>
                  <tr>
                    <td>Floppy Drive? </td>
                    <td><input type="Radio" name="Floppy" value="YES">
YES </td>
                    <td><input type="Radio" name="Floppy" value="NO">
NO</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                  </tr>
                  <tr>
                    <td height="37">Power Supply Watts: </td>
                    <td><select name="watts">
                      <option> 400 Watts
                      <option> 450 Watts
                      <option> 500 Watts
                      <option> 550+ Watts
                    </select></td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                  </tr>
                </table>
  <p>
    <input type="hidden" name="required" value="email">
    <input type="hidden" name="print_blank_fields" value="true">
    <input type="hidden" name="recipient" value="sales@jonspcrepair.com">
    <input type="hidden" name="subject" value="Custom Computer">
    <input type="Submit" Value="Submit">
    <INPUT TYPE="RESET">
</p>
</FORM>
</body>
<?php
     $dbh
=mysql_connect ("jonspcrepair.com""uazozqli_Jon""*******") or die ('I cannot connect to the database because: ' mysql_error());
mysql_select_db ("uazozqli_custom");

    include (
'http://jonspcrepair.com/inc/footer.php');
?>

</Body>
what i need it to do is instead of me creating all the feilds i need it to get the information from the database and show it to the user. so if a computer componet comes out i update the database instead of rewriting the script
__________________
AMW_Drizz
Php 5.2 Mysql 4.1 IIS 6 Win2k3 Server && PHP 5.2 MySQL 4.1 Apache 2.2 (separate machine of course)
amw_drizz is offline
Reply With Quote
View Public Profile Visit amw_drizz's homepage!
 
Old 11-23-2004, 09:19 PM
Republikin's Avatar
Super Moderator

Posts: 3,191
Well, thats going to be a bit more complex than I'm personally willing to type up here. Not that I don't want to help, I just feel that actually creating such a script and the db schema could take a couple hours.

I would look into a premade script like osCommerce. Here is a mod made for it that suits what your trying to do.
http://www.oscommerce.com/community/...,all/search,pc
Republikin is offline
Reply With Quote
View Public Profile
 
Old 11-23-2004, 09:50 PM
amw_drizz's Avatar
Ultra Talker

Posts: 301
Name: Jon
Location: New York
thanks i am looking in to it as of now/
__________________
AMW_Drizz
Php 5.2 Mysql 4.1 IIS 6 Win2k3 Server && PHP 5.2 MySQL 4.1 Apache 2.2 (separate machine of course)
amw_drizz is offline
Reply With Quote
View Public Profile Visit amw_drizz's homepage!
 
Old 11-24-2004, 11:29 AM
amw_drizz's Avatar
Ultra Talker

Posts: 301
Name: Jon
Location: New York
now to make it work
thanks for your recommdation. it will save a few hours of codeing and testing!
__________________
AMW_Drizz
Php 5.2 Mysql 4.1 IIS 6 Win2k3 Server && PHP 5.2 MySQL 4.1 Apache 2.2 (separate machine of course)
amw_drizz is offline
Reply With Quote
View Public Profile Visit amw_drizz's homepage!
 
Reply     « Reply to Have Form call MySql Database
 

Thread Tools

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.14639 seconds with 12 queries