Jump to content

gfmaking

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

gfmaking's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Oppppps....OK I have mysql database built & my Customers put data through HTML form by my pHP file to the database. Now to diplay the result on an HTML formagain, I want a query but what i want is the result to desplay in a table format instead of just scramble on the sreen. Am i clear now? Thanks for your help
  2. please some one give me the query format, I will edit the security like password... I want to get a query of all the fields i a table sorted by a date and the result I want it on a table format instead of comma delimmeted. Thanks
  3. Hi Andy, I used HTML Form to submit contact and order info to my mysql database. When Submiting the form balnk page apears & nothing was been inserted in to the database. Of course I used "post" method for my HTML form and I saved the above code in to action.php file. Please look in to it.
  4. what is wrong with this code? can any one help please. I have tried evrything <? $username="gfm"; $password="chris"; $database="Order_db"; $host="localhost"; $First_Name=$_POST['First_Name']; $Last_Name=$_POST['Last_Name']; $Address=$_POST['Address']; $City=$_POST['City']; $State=$_POST['State']; $Zip=$_POST['Zip']; $Country=$_POST['Country']; $Phone=$_POST['Phone']; $E-Mail=$_POST['E-Mail']; $Product_01=$_POST['Product01']; $Product_02=$_POST['Product02']; $connection = mysql_connect($host,$username,$password)or die( "Unable to connect to server"); $db= mysql_select_db($database,$connection) or die( "Unable to select database"); $query = "INSERT INTO Order_Form (First_Name, Last_Name, Address, City, State, Zip, Country, phone, E-mail, Product01, Product02) VALUES ('$First_Name','$Last_Name','$Address','$City','$State','$Zip','$Country','$phone','$E-mail','$Product01','$Product02')"; $result = mysql_query($query) or die("Error: ". mysql_error(). " with query ". $query); // see the problem if($result) { echo "Thank You For your Order"; } mysql_close(); ?>
  5. Thanks for your time sir, I have made the following change but still showing that blank page.... <? $username="gfm"; $password="chris"; $database="Order_db"; $host="localhost"; $First_Name=$_POST['First_Name']; $Last_Name=$_POST['Last_Name']; $Address=$_POST['Address']; $City=$_POST['City']; $State=$_POST['State']; $Zip=$_POST['Zip']; $Country=$_POST['Country']; $Phone=$_POST['Phone']; $E-Mail=$_POST['E-Mail']; $Product_01=$_POST['Product01']; $Product_02=$_POST['Product02']; $connection = mysql_connect($host,$username,$password)or die( "Unable to connect to server"); $db= mysql_select_db($database,$connection) or die( "Unable to select database"); $query = "INSERT INTO Order_Form (First_Name, Last_Name, Address, City, State, Zip, Country, phone, E-mail, Product01, Product02) VALUES ('$First_Name','$Last_Name','$Address','$City','$State','$Zip','$Country','$phone','$E-mail','$Product01','$Product02')"; $result = mysql_query($query) or die("Error: ". mysql_error(). " with query ". $query); // see the problem if($result) { echo "Thank You For your Order"; } mysql_close(); ?>
  6. ohhh please can any one help me what is wrong with my code here? I use hTML Form with <form method="post" action="action.php"> I saved the following code in action.php file. When submiting the form blank page apears no data inserted. Please some one help me I have a deadline. God bless. <? $username="gfm"; $password="cris"; $database="Order_db"; $host="localhost"; $First_Name=$_POST['First_Name']; $Last_Name=$_POST['Last_Name']; $Address=$_POST['Address']; $City=$_POST['City']; $State=$_POST['State']; $Zip=$_POST['Zip']; $Country=$_POST['Country']; $Phone=$_POST['Phone']; $E-Mail=$_POST['E-Mail']; $Product_01=$_POST['Product01']; $Product_02=$_POST['Product02']; $connection = mysql_connect($host,$username,$password)or die( "Unable to connect to server"); $db= mysql_select_db($database,$connection) or die( "Unable to select database"); $query = "INSERT INTO Order_Form VALUES ($First_Name,$Last_Name,$Address,$City,$State,$Zip,$Country,$phone,$E-mail,$email,$Product01,$Product02); $result = mysql_query($query) or die("Error: ". mysql_error(). " with query ". $query); // see the problem if($result) { echo "Thank You For your Order"; } mysql_close(); ?>
  7. [!--quoteo(post=386600:date=Jun 21 2006, 05:54 PM:name=michaellunsford)--][div class=\'quotetop\']QUOTE(michaellunsford @ Jun 21 2006, 05:54 PM) [snapback]386600[/snapback][/div][div class=\'quotemain\'][!--quotec--] Mysqlconnect typically gets the value "localhost" -- not a php file location. you might check to make sure you're connecting to the right place. Also, if your action is to action.php, I would assume the code you showed in your post is actually named "action.php" [/quote] Thanx for your response, I put my action.php on my rootweb and edit to "localhost" but when submiting the form the browser point to action.php and show blank page.
  8. I want people to fill out my form, which is contact information, and I want the info directly load in to mysql database. Please look the PHP code. On the HTML form I inserted <form method="post" form action="action.php"> what is wrong? my database is running on my webhosting server in one of the sub folders. please please some one help me. <? $username="myuser"; $password="mypass"; $database="Order_db"; $First_Name=$_POST['First_Name']; $Last_Name=$_POST['Last_Name']; $Address=$_POST['Address']; $City=$_POST['City']; $State=$_POST['State']; $Zip_Code=$_POST['Zip']; $Country=$_POST['Country']; $phone=$_POST['phone']; $E-Mail=$_POST['E-mail']; $Product_01=$_POST['Product01']; $Username8=$_POST['Product02']; mysql_connect('genesis.com/fpdb/php/index.php',$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query = "INSERT INTO contacts VALUES ('','$First_Name','$Last_Name','$Address','$City','$State','$Zip','$Country','$phone','$E-mail','$email','$Product01','$Product02')"; mysql_query($query); mysql_close(); ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.