
Modernvox
Members-
Posts
412 -
Joined
-
Last visited
Never
Everything posted by Modernvox
-
PLEASE Tell me what's wrong with my form- Please......
Modernvox replied to Modernvox's topic in PHP Coding Help
This is my form <form action="process_items.php" method="post"> <font face= "calibri" size= "4"> <table border= "1"> <tr style= "background: #cccccc"> <td><b>Item Description:</b></td> <td><input type= "text" name= "itemDescription" size= "30" value=""/></td> </tr> <tr style= "background: #99ff00"> <td><b>Item Price:</b></td> <td><input type= "text" name= "itemPrice" size= "5" value=""/></td> </tr> </tr style= "background: #A8E5FF"> <td><b>Winning Bidders:</b></td> <td><input type="text" name= "winningBidder" size= "5" /></td> </tr> <tr> <td><b>How many deals?:</b></td> <td><input type="text" name= "itemQty" size= "3" value= "1" /></td> </tr> <br/> <tr> <td><input type="reset" value="Reset Form"></td> <td><input type="submit" name="submit" value= "submit" /></td> </tr></font> </table> </form> -
PLEASE Tell me what's wrong with my form- Please......
Modernvox replied to Modernvox's topic in PHP Coding Help
I'm getting this error, Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\process_items.php on line 39 The problem with this is i use the same queries from another page and it works from there? -
Hi Guys, 3 days later and i still can't figure this out... I have small script i created for a local auction house. The client will be entering details like [item Name] [item price] [item qty] and [bidders Id] All bidders are logged in as they arrive through the door. Everything is working fine, but when the client fills in the [item details] with a bidder Id that is NOT logged, I want to issue a warning that allows the opportunity to log the user at that time or NOT. I have created this form, but it does NOTHING at ALL. Please have a look, kick me in the ass and teach me a thing or two would ya , please? <?php ob_start(); $host= ""; $db_name= ""; $db_user= ""; $db_password= ""; if (isset($_POST['itemDescription'], $_POST['itemPrice'], $_POST['winningBidder'], $_POST['itemQty'])) { $itemDescription= isset($_POST['itemDescription']) ? $_POST['itemDescription'] : ''; $itemPrice= isset($_POST['itemPrice']) ? $_POST['itemPrice'] : ''; $winningBidder= isset($_POST['winningBidder']) ? $_POST['winningBidder'] : ''; $itemQty= isset($_POST['itemQty']) ? $_POST['itemQty'] : ''; mysql_connect("$host", "$db_user", "$db_password")or die("cannot connect to server"); mysql_select_db("$db_name")or die("cannot select DB"); $sql="SELECT * FROM transactions WHERE bidderIds='$winningBidder'"; $result=mysql_query($sql); $count=mysql_num_rows($result); // If result matched, table row must be 1 row if($count==0) { echo "That Bidder Number is NOT logged in, "; echo "would you like to set this bidder as active?"; echo " Enter 1=NO or 2=YES"; echo "<form action= \"process_items.php\" method= \"POST\">"; echo "<input type =\"text\" name= \"logUser\"/>"; echo "<input type= \"submit\" value = \"Submit\"/>"; exit(); } if(isset($_POST['logUser'])) { $logUser= isset($_POST['logUser']) ? $_POST['logUser'] : ''; if ($logUser= 1) { header("Location: inprogress.php"); exit(); } /////end if logUser is set else if ($logUser= 2){ mysql_connect("$host", "$db_user", "$db_password")or die("cannot connect to server"); mysql_select_db("$db_name")or die("cannot select DB"); mysql_Query("INSERT INTO bidders (biddersId) VALUES ('$winningBidder')"); echo $row['winningBidder']; mysql_query("INSERT INTO transactions (itemDescription, itemPrice, bidderId, itemQty , totalPrice) VALUES('$itemDescription', '$itemPrice','$winningBidder', '$itemQty', '$totalPrice')") or die(mysql_error()); header("Location: inprogress.php"); exit(); } /////////end loguser2 } } //////end if item decription,etc is set ob_flush(); echo "<font color= \"red\" face=\"calibri\" size=\"4\">That bidder is already logged, Please press your browsers back button and try again.</font>"; ?> The script is NOT acknowledging the $logUser variable at ALL, as if the script is not getting that far or reading it. I suspect I am echoing the form wrong? It does however echo "That Bidder Number is NOT logged in, "; "would you like to set this bidder as active?"; " Enter 1=NO or 2=YES";
-
Narrowed it down to this section of code. Did I mess up the form? should i be using php self for this since process.php is the page the form redirects to which is the same page that echo's the form? if($count==0){ echo "That Bidder Number is NOT logged in, "; echo "would you like to set this bidder as active?"; echo " Enter 1 for NO or 2 for YES"; echo "<form action= \"process.php\" method= \"POST\">"; echo "<input type =\"text\" name= \"logUser\"/>"; echo "<input type= \"submit\" value = \"Submit\"/>"; echo "</form>"; exit(); } } $logUser= isset($_POST['logUser']) ? $_POST['logUser'] : ''; if ($logUser= '1') { header("Location: inprogress.php"); exit(); } if ($logUser= '2'){ echo "hello"; }
-
Commented in red is the code that doesn't produce anything. It is 3/4 of the way down the page.. Thanks for looking! <?php error_reporting(E_ALL); ini_set("display_errors", 1); $host= ""; $db_name= ""; $db_user= ""; $db_password= ""; ob_start(); if(isset($_POST['newBidder'])) { $newBidder= isset($_POST['newBidder']) ? $_POST['newBidder'] : ''; $bidderId= $newBidder; mysql_connect("$host", "$db_user", "$db_password")or die("cannot connect to server"); mysql_select_db("$db_name")or die("cannot select DB"); $sql="SELECT * FROM bidders WHERE biddersId='$bidderId'"; $result=mysql_query($sql); // Mysql_num_row is counting table row $count=mysql_num_rows($result); // If result matched $myusername and $mypassword, table row must be 1 row if($count==0){ // Add $biddersId and redirect to anypage mysql_Query("INSERT INTO bidders (biddersId) VALUES ('$bidderId')"); header("Location: index.php"); exit(); } } //////////////////////////////////// if(isset($_POST['deleteBidder'])) { $deleteBidder= isset($_POST['deleteBidder']) ? $_POST['deleteBidder'] : ''; mysql_connect("$host", "$db_user", "$db_password")or die("cannot connect to server"); mysql_select_db("$db_name")or die("cannot select DB"); mysql_query("DELETE FROM bidders WHERE biddersId='$deleteBidder'"); header("Location: index.php"); exit(); } //////////////////////////////////// if (isset($_POST['itemDescription'], $_POST['itemPrice'], $_POST['winningBidder'], $_POST['itemQty'])) { $itemDescription= isset($_POST['itemDescription']) ? $_POST['itemDescription'] : ''; $itemPrice= isset($_POST['itemPrice']) ? $_POST['itemPrice'] : ''; $winningBidder= isset($_POST['winningBidder']) ? $_POST['winningBidder'] : ''; $itemQty= isset($_POST['itemQty']) ? $_POST['itemQty'] : ''; mysql_connect("$host", "$db_user", "$db_password")or die("cannot connect to server"); mysql_select_db("$db_name")or die("cannot select DB"); $sql="SELECT * FROM bidders WHERE biddersId='$winningBidder'"; $result=mysql_query($sql); $count=mysql_num_rows($result); // If result matched, table row must be 1 row if($count==0){ echo "That Bidder Number is NOT logged in, "; echo "would you like to set this bidder as active?"; echo " Enter 1 for NO or 2 for YES"; echo "<form action= \"process.php\" method= \"POST\">"; echo "<input type =\"text\" name= \"logUser\"/>"; echo "<input type= \"submit\" value = \"Submit\"/>"; exit(); } } $logUser= isset($_POST['logUser']) ? $_POST['logUser'] : ''; if ($logUser= '1') { header("Location: inprogress.php"); exit(); } if ($logUser= '2'){ // Add $biddersId and redirect to anypage mysql_connect("$host", "$db_user", "$db_password")or die("cannot connect to server"); mysql_select_db("$db_name")or die("cannot select DB"); mysql_Query("INSERT INTO bidders (biddersId) ////This won't add biddersid to database///////[ VALUES ('$winningBidder')"); mysql_query("INSERT INTO transactions /////This won't add details to the database either?///// VALUES('$itemDescription', '$itemPrice','$winningBidder', '$itemQty', '$totalPrice')") or die(mysql_error()); header("Location: inprogress.php"); exit(); } //////////////////////////////////////// echo "<font color= \"red\" face=\"calibri\" size=\"4\">That bidder is already logged, Please press your browsers back button and try again.</font>"; ob_end_flush(); ?> I have one database with 2 tables as follows bidders table ONLY has biddersId field; transactions has (in order) itemDescription, itemPrice, bidderId, itemQty, totalPrice everything else works, except updating the database with the above? Am I doing something wrong in MySql. I have all eroors on , but i get NONE when running the script?
-
Why are 5 of my 7 Variables reporting as Undefined? I'm Lost......
Modernvox replied to Modernvox's topic in PHP Coding Help
Almost there, but i face one more obstacle. I receive no errors, but no input is added to the database. If anyone sees something out of whack, please respond? if (isset($_POST['itemDescription'], $_POST['itemPrice'], $_POST['winningBidder'], $_POST['itemQty'])) { $itemDescription= isset($_POST['itemDescription']) ? $_POST['itemDescription'] : ''; $itemPrice= isset($_POST['itemPrice']) ? $_POST['itemPrice'] : ''; $winningBidder= isset($_POST['winningBidder']) ? $_POST['winningBidder'] : ''; $itemQty= isset($_POST['itemQty']) ? $_POST['itemQty'] : ''; mysql_connect("$host", "$db_user", "$db_password")or die("cannot connect to server"); mysql_select_db("$db_name")or die("cannot select DB"); $sql="SELECT * FROM bidders WHERE biddersId='$winningBidder'"; $result=mysql_query($sql); $count=mysql_num_rows($result); // If result matched, table row must be 1 row if($count==0){ echo "That Bidder Number is NOT logged in, "; echo "would you like to set this bidder as active?"; echo " Enter 1 for NO or 2 for YES"; echo "<form action= \"process.php\" method= \"POST\">"; echo "<input type =\"text\" name= \"logUser\"/>"; echo "<input type= \"submit\" value = \"Submit\"/>"; exit(); } } $logUser= isset($_POST['logUser']) ? $_POST['logUser'] : ''; if ($logUser= '1') { header("Location: inprogress.php"); exit(); } else if ($logUser= '2'){ // Add $biddersId and redirect to anypage mysql_connect("$host", "$db_user", "$db_password")or die("cannot connect to server"); mysql_select_db("$db_name")or die("cannot select DB"); mysql_Query("INSERT INTO bidders (biddersId) VALUES ('$winningBidder')"); mysql_query("INSERT INTO transactions VALUES('$itemDescription', '$itemPrice','$winningBidder', '$itemQty', '$totalPrice')") or die(mysql_error()); header("Location: inprogress.php"); exit(); } -
Why are 5 of my 7 Variables reporting as Undefined? I'm Lost......
Modernvox replied to Modernvox's topic in PHP Coding Help
Just wanted to let you know where i goofed(we know all the other goofs, this is the my sql goof:-) highlighted in Orange. <?php error_reporting(E_ALL); ini_set("display_errors", 1); $host= "localhost"; $db_name= "bidders"; $db_user= "root"; $db_password= ""; ob_start(); if(isset($_POST['newBidder'])) { $newBidder= isset($_POST['newBidder']) ? $_POST['newBidder'] : ''; $bidderId= $newBidder; mysql_connect("$host", "$db_user", "$db_password")or die("cannot connect to server"); mysql_select_db("$db_name")or die("cannot select DB"); $sql="SELECT * FROM bidders WHERE biddersId='$bidderId'"; $result=mysql_query($sql); // Mysql_num_row is counting table row $count=mysql_num_rows($result); // If result matched $myusername and $mypassword, table row must be 1 row if($count==0){ // Add $biddersId and redirect to anypage mysql_Query("INSERT INTO bidders (biddersId) VALUES ('$bidderId')"); header("Location: index.php"); exit(); } } if(isset($_POST['deleteBidder'])) { $deleteBidder= isset($_POST['deleteBidder']) ? $_POST['deleteBidder'] : ''; mysql_connect("$host", "$db_user", "$db_password")or die("cannot connect to server"); mysql_select_db("$db_name")or die("cannot select DB"); mysql_query("DELETE FROM bidders WHERE biddersId='$deleteBidder'"); header("Location: index.php"); exit(); } if (isset($_POST['itemDescription'], $_POST['itemPrice'], $_POST['winningBidder'], $_POST['itemQty'])) { $itemDescription= isset($_POST['itemDescription']) ? $_POST['itemDescription'] : ''; $itemPrice= isset($_POST['itemPrice']) ? $_POST['itemPrice'] : ''; $winningBidder= isset($_POST['winningBidder']) ? $_POST['winningBidder'] : ''; $itemQty= isset($_POST['itemQty']) ? $_POST['itemQty'] : ''; mysql_connect("$host", "$db_user", "$db_password")or die("cannot connect to server"); mysql_select_db("$db_name")or die("cannot select DB"); $sql="SELECT * FROM transactions WHERE bidderIds='$winningBidder'"; [color=red]//transactions uses bidderId NOT biddersId[/color] $result=mysql_query($sql); $count=mysql_num_rows($result); // If result matched, table row must be 1 row if($count==0){ echo "That Bidder Number is NOT logged in, "; echo "would you like to set this bidder as active?"; echo " Enter 1 for NO or 2 for YES"; echo "<form action= \"process.php\" method= \"POST\">"; echo "<input type =\"text\" name= \"logUser\"/>"; echo "<input type= \"submit\" value = \"Submit\"/>"; $logUser= isset($_POST['logUser']) ? $_POST['logUser'] : ''; exit(); } if ($logUser= 1) { header("Location: inprogress.php"); exit(); } else if ($logUser= 2){ // Add $biddersId and redirect to anypage mysql_connect("$host", "$db_user", "$db_password")or die("cannot connect to server"); mysql_select_db("$db_name")or die("cannot select DB"); mysql_Query("INSERT INTO bidders (biddersId) VALUES ('$winningBidder')"); echo $row['winningBidder']; mysql_query("INSERT INTO transactions (itemDescription, itemPrice, bidderId, itemQty , totalPrice) VALUES('$itemDescription', '$itemPrice','$winningBidder', '$itemQty', '$totalPrice')") or die(mysql_error()); header("Location: inprogress.php"); exit(); } } echo "<font color= \"red\" face=\"calibri\" size=\"4\">That bidder is already logged, Please press your browsers back button and try again.</font>"; ob_end_flush(); ?> -
Why are 5 of my 7 Variables reporting as Undefined? I'm Lost......
Modernvox replied to Modernvox's topic in PHP Coding Help
C'mon now, I can barely swallow what's in front of me...I don't know where to print out the query? This is a problem , no? mysql_Query("INSERT INTO bidders (biddersId) VALUES ('$winningBidder')"); echo $row['winningBidder']; mysql_query("INSERT INTO transactions (itemDescription, itemPrice, bidderId, itemQty , totalPrice) VALUES('$itemDescription', '$itemPrice','$winningBidder', '$itemQty', '$totalPrice')") or die(mysql_error()); header("Location: index.php"); exit(); Because I ma using the same name mysql_Query? -
Why are 5 of my 7 Variables reporting as Undefined? I'm Lost......
Modernvox replied to Modernvox's topic in PHP Coding Help
Alright, So I owe you a cheeseburger. When your in the U.S. come see me. The only remaining problem is in my SQL statement as it reads "Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\process.php on line 91 I will look into this thoroughly t see if I can't find what i am doing wrong. Thanks again:-) -
Why are 5 of my 7 Variables reporting as Undefined? I'm Lost......
Modernvox replied to Modernvox's topic in PHP Coding Help
That part of the script is already working, so why mess with it? -
Why are 5 of my 7 Variables reporting as Undefined? I'm Lost......
Modernvox replied to Modernvox's topic in PHP Coding Help
Because even though you're not submitting that form the code is getting a point where it's using a variable that is not defined (obviously). Just make sure that before you use a variable from an outside source that might not be set you make sure that it is using isset. You must've edited that code because the errors you posted can't be happening on those lines in the code provided. Don't know what to tell ya bud, it is what it is. Just ain't working.... -
Why are 5 of my 7 Variables reporting as Undefined? I'm Lost......
Modernvox replied to Modernvox's topic in PHP Coding Help
Oops and here's the process.php page for all the forms. <?php error_reporting(E_ALL); ini_set("display_errors", 1); $host= ""; $db_name= ""; $db_user= ""; $db_password= ""; ob_start(); if ($_POST['newBidder']) { $newBidder= isset($_POST['newBidder']) ? $_POST['newBidder'] : ''; $bidderId= $newBidder; mysql_connect("$host", "$db_user", "$db_password")or die("cannot connect to server"); mysql_select_db("$db_name")or die("cannot select DB"); $sql="SELECT * FROM bidders WHERE biddersId='$bidderId'"; $result=mysql_query($sql); // Mysql_num_row is counting table row $count=mysql_num_rows($result); // If result matched $myusername and $mypassword, table row must be 1 row if($count==0){ // Add $biddersId and redirect to anypage mysql_Query("INSERT INTO bidders (biddersId) VALUES ('$bidderId')"); header("Location: index.php"); exit(); } } if ($_POST['deleteBidder']) { $deleteBidder= isset($_POST['deleteBidder']) ? $_POST['deleteBidder'] : ''; mysql_connect("$host", "$db_user", "$db_password")or die("cannot connect to server"); mysql_select_db("$db_name")or die("cannot select DB"); mysql_query("DELETE FROM bidders WHERE biddersId='$deleteBidder'"); header("Location: index.php"); exit(); } if (isset($_POST['itemDescription'], $_POST['itemPrice'], $_POST['winningBidder'], $_POST['itemQty'])) { $itemDescription= isset($_POST['itemDescription']) ? $_POST['itemDescription'] : ''; $itemPrice= isset($_POST['itemPrice']) ? $_POST['itemPrice'] : ''; $winningBidder= isset($_POST['winningBidder']) ? $_POST['winningBidder'] : ''; $itemQty= isset($_POST['itemQty']) ? $_POST['itemQty'] : ''; mysql_connect("$host", "$db_user", "$db_password")or die("cannot connect to server"); mysql_select_db("$db_name")or die("cannot select DB"); $sql="SELECT * FROM transactions WHERE biddersId='$winningBidder'"; $result=mysql_query($sql); $count=mysql_num_rows($result); // If result matched, table row must be 1 row if($count==0){ echo "That Bidder Number is NOT logged in, "; echo "would you like to set this bidder as active?"; echo " Enter 1 for NO or 2 for YES"; echo "<form action= \"process.php\" method= \"POST\">"; echo "<input type =\"text\" name= \"logUser\"/>"; echo "<input type= \"submit\" value = \"Submit\"/>"; $logUser= isset($_POST['logUser']) ? $_POST['logUser'] : ''; exit(); } if ($logUser= 1) { header("Location: inprogress.php"); exit(); } else if ($logUser= 2){ // Add $biddersId and redirect to anypage mysql_connect("$host", "$db_user", "$db_password")or die("cannot connect to server"); mysql_select_db("$db_name")or die("cannot select DB"); mysql_Query("INSERT INTO bidders (biddersId) VALUES ('$winningBidder')"); mysql_query("INSERT INTO transactions (itemDescription, itemPrice, bidderId, itemQty , totalPrice) VALUES('$itemDescription', '$itemPrice','$winningBidder', '$itemQty', '$totalPrice')") or die(mysql_error()); header("Location: index.php"); exit(); } } echo "<font color= \"red\" face=\"calibri\" size=\"4\">That bidder is already logged, Please press your browsers back button and try again.</font>"; ob_end_flush(); ?> -
Why are 5 of my 7 Variables reporting as Undefined? I'm Lost......
Modernvox replied to Modernvox's topic in PHP Coding Help
Ok this is the form that adds item description, price, qty and biddersid number. <form action="process.php" method="post"> <font face= "calibri" size= "4"> <table border= "1"> <tr style= "background: #cccccc"> <td><b>Item Description:</b></td> <td><input type= "text" name= "itemDescription" size= "30" value=""/></td> </tr> <tr style= "background: #99ff00"> <td><b>Item Price:</b></td> <td><input type= "text" name= "itemPrice" size= "5" value=""/></td> </tr> </tr style= "background: #A8E5FF"> <td><b>Winning Bidders:</b></td> <td><input type="text" name= "winningBidder" size= "5" /></td> </tr> <tr> <td><b>How many deals?:</b></td> <td><input type="text" name= "itemQty" size= "3" value= "1" /></td> </tr> <br/> <input type="reset" value="Reset Form"><input type="submit" name="submit" value= "submit" /> </font> </table> </form> These are the foms that add or delete a bidders ID located on a different page other than the of the itemdescription , etc form. <tr> <td><font face= "calibri" size= "4"> Let's begin by adding bidders...</font></td> </tr> <Table border= "1"> <form action="process.php" method="post"> <tr style="background: #99cc33;"> <td><strong><font face= "calibri" style= "bold"> Bidders Id: </font></strong></td> <td><input type= "text" name= "newBidder"/></td> </tr> <tr> <td><input type="Submit" value="submit"></td> </tr> </table> </form> <tr> <td><font face= "calibri" size= "4"> Here we can </font><font color= "red"> delete bidders.</font></td> </tr> <Table border= "1"> <form action="process.php" method="post"> <tr style="background: #ff6600;"> <td><strong><font face= "calibri" style= "bold"> Bidders Id: </font></strong></td> <td><input type= "text" name= "deleteBidder"/></td> </tr> <tr> <td><input type="Submit" value="submit"></td> </tr> </table> </form> Still don't understand why the script tells me delete and newbidder are undefined when I am not submitting those forms?? -
Why are 5 of my 7 Variables reporting as Undefined? I'm Lost......
Modernvox replied to Modernvox's topic in PHP Coding Help
Yes sir and here's what I have as of now for errors Notice: Undefined index: newBidder in C:\xampp\htdocs\process.php on line 52 Notice: Undefined index: deleteBidder in C:\xampp\htdocs\process.php on line 75 Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\process.php on line 99 That Bidder Number is NOT logged in, would you like to set this bidder as active? Enter 1 for NO or 2 for YES -
Why are 5 of my 7 Variables reporting as Undefined? I'm Lost......
Modernvox replied to Modernvox's topic in PHP Coding Help
Yeah the two forms I didn't close off are the ONLY 2 working:-) -
Why are 5 of my 7 Variables reporting as Undefined? I'm Lost......
Modernvox replied to Modernvox's topic in PHP Coding Help
After all fixes here's what we got for errors (smaller list:-) Notice: Undefined index: deleteBidder in C:\xampp\htdocs\process.php on line 43 Notice: Undefined index: newBidder in C:\xampp\htdocs\process.php on line 44 Notice: Undefined index: newBidder in C:\xampp\htdocs\process.php on line 52 Notice: Undefined index: deleteBidder in C:\xampp\htdocs\process.php on line 74 Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\process.php on line 98 -
Why are 5 of my 7 Variables reporting as Undefined? I'm Lost......
Modernvox replied to Modernvox's topic in PHP Coding Help
Even with all these fixes, I still get the same errors in that all my variables are undefined from that particular form.. I need a cheeseburger, i'm getting upset -
Why are 5 of my 7 Variables reporting as Undefined? I'm Lost......
Modernvox replied to Modernvox's topic in PHP Coding Help
Ok. SO, what would my if statements look like if my variables are being set as $logUser= isset($_POST['logUser']) ? $_POST['logUser'] : ''; if ($logUser) { Conditions here } ?? -
Why are 5 of my 7 Variables reporting as Undefined? I'm Lost......
Modernvox replied to Modernvox's topic in PHP Coding Help
Ok. So, i must do this for each of my variables I suppose> $logUser= isset($_POST['logUser']) ? $_POST['logUser'] : ''; ? -
Why are 5 of my 7 Variables reporting as Undefined? I'm Lost......
Modernvox replied to Modernvox's topic in PHP Coding Help
Understood ALex, I thank you. How is that suppose to be written if (isset(firstvar) && (second var) or is it isset($_POST['firstvar'] && ?? Sorry, multiple conditions confuse my little brain.. -
Why are 5 of my 7 Variables reporting as Undefined? I'm Lost......
Modernvox replied to Modernvox's topic in PHP Coding Help
So I should be using isset instead of just if $_POST['whatever'] ? -
Why are 5 of my 7 Variables reporting as Undefined? I'm Lost......
Modernvox replied to Modernvox's topic in PHP Coding Help
These 2 forms work as expected: <tr> <td><font face= "calibri" size= "4"> Let's begin by adding bidders...</font></td> </tr> <Table border= "1"> <form action="process.php" method="post"> <tr style="background: #99cc33;"> <td><strong><font face= "calibri" style= "bold"> Bidders Id: </font></strong></td> <td><input type= "text" name= "newBidder"/></td> </tr> <tr> <td><input type="Submit" value="submit"></td> </tr> </table> <tr> <td><font face= "calibri" size= "4"> Here we can </font><font color= "red"> delete bidders.</font></td> </tr> <Table border= "1"> <form action="process.php" method="post"> <tr style="background: #ff6600;"> <td><strong><font face= "calibri" style= "bold"> Bidders Id: </font></strong></td> <td><input type= "text" name= "deleteBidder"/></td> </tr> <tr> <td><input type="Submit" value="submit"></td> </tr> </table> -
Why are 5 of my 7 Variables reporting as Undefined? I'm Lost......
Modernvox replied to Modernvox's topic in PHP Coding Help
Yeah..Fixed the <input type="submit" name="submit" value= "Save & Cont." " /> crap, but still producing same errors -
Why are 5 of my 7 Variables reporting as Undefined? I'm Lost......
Modernvox replied to Modernvox's topic in PHP Coding Help
Here's what my code id producing for an error Notice: Undefined index: deleteBidder in C:\xampp\htdocs\process.php on line 44 Notice: Undefined index: newBidder in C:\xampp\htdocs\process.php on line 45 Notice: Undefined index: itemDescription in C:\xampp\htdocs\process.php on line 46 Notice: Undefined index: itemPrice in C:\xampp\htdocs\process.php on line 47 Notice: Undefined index: winningBidder in C:\xampp\htdocs\process.php on line 48 Notice: Undefined index: itemQty in C:\xampp\htdocs\process.php on line 49 Notice: Undefined index: newBidder in C:\xampp\htdocs\process.php on line 56 Notice: Undefined index: deleteBidder in C:\xampp\htdocs\process.php on line 78 Notice: Undefined index: itemDescription in C:\xampp\htdocs\process.php on line 89 That bidder is already logged, Please press your browsers back button and try again. -
Why are 5 of my 7 Variables reporting as Undefined? I'm Lost......
Modernvox replied to Modernvox's topic in PHP Coding Help
That's from another form on the another page Alex. I am using process.php to process all forms