Database Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesDatabase Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old April 22nd, 2004, 03:03 AM
Cienbao Cienbao is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Singapore
Posts: 1 Cienbao User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Cienbao Send a message via AIM to Cienbao Send a message via Yahoo to Cienbao
$_POST from a field in HTML form is blank

Linux
PHP 4

?php
include 'db.php';
$db = mysql_select_db("$database_name", $connection)
or die("Couldn't select database.");

// Define post fields into simple variables
$TDesca = $_POST['CShipT'];
$TDesca .= ": ";
$Tdesca .= $_POST['Distm'];
$Tdesca .= $_POST['Meas'];
$TDesca .= "Par: ";
$TDesca .= $_POST['Par'];
$TDesca .= ": ";
$TDesca .= "Rating: ";
$Tdesca .= $_POST['Courat'];
//'Rating: ' + $_POST['courat'] + ',Slope: ' + $_POST['sloprat']+'<br>'+$_POST['ment']+': ' + $_POST['distm1']+$_POST['dist1']+',Par: '+$_POST['par1']+',Rating: '+$_POST['courat1']+',Slop: '+$_POST['sloprat1']+'<br>'+$_POST['ment1']+' '+$_POST['distm2']+' '+$_POST['dist2']+',Par: '+$_POST['par']+',Rating: '+$_POST['courat2']+',Slope: '+$_POST['sloprat']+'<br>';
//$Td = addslashes($Tdesca);
$TDesc1 = $_POST['TDesc1'];
$Td1 = addslashes($TDesc1);
$TDesc2 = $_POST['TDesc2'];
$Td2 = addslashes($TDesc2);

$Nghgolf = $_POST['Nghgolf'];
$CourseD = $_POST['CourseD'];
$TypeC = $_POST['TypeC'];
$Fairway = $_POST['FairwayG'];
$Green = $_POST['Green'];
$Dist = $_POST['Distme'];
$DistM = $_POST['DistMa'];

/* Do some error checking on the form posted fields */
if(!$GolfClub){
echo 'You did not submit the following required information! <br />';
if(!$glfclbn){
echo "Golf Club Name is a required field. Please enter it below.<br />" . $TDesca;
}
include 'glfdet.htm'; // Show the form again!
/* End the error checking and if everything is ok, we'll move on to
creating the user account */
exit(); // if the error checking has failed, we'll exit the script!
}

// Enter info into the Database.
// $info2 = htmlspecialchars($info);
$sql = mysql_query("INSERT INTO glfdetails (golfclubname,howto,nocourse,Description,Desc1,Des c2,CourseDet,CourseDet1,CourseDet2,CourseD,Courset ype,Nightglf,FwayGrass,Greens,Dist,DistMarker)
VALUES('$GolfClub','$Howtoos','$NCourse','$Desc',' $courname','$courname1','$CShipT','$Td1','$Td2','$ CourseD','$TypeC','$NghGolf','$fairway','$Greens', '$Dist','$DistM')") or die (mysql_error());
//
//
if(!$sql){
echo 'There has been an error writing to the datbase. Please contact the webmaster.';
}
include 'glfdet.htm';
?>

the fields from my HTML form Distm and Meas when posted has blank values but I have already input a value in these fields. I do not understand why it did not capture the value. Can anyone help?
Thanks.
Bob

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesDatabase Help > $_POST from a field in HTML form is blank


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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 On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT