maddcow26 Posted September 24, 2008 Share Posted September 24, 2008 Hi everyone, I put together a php page using a variety of resources to create a form that will populate my db from a questionnaire. I used a format right out of a php guidebook. Basically I am doing everything from the one page. php code followed by the form. I debugged a few basic syntax errors that appeared but once i got the page to load cleanly, I entered info into the form and hit submit... and it just reloaded an empty copy of the page. I checked the db and no info was entered. I have no idea where to look for the problem without error codes... and no idea why my error handling isn't catching it. Can someone more capable than me point me to the right direction here? Would it be ok to post my code? Quote Link to comment https://forums.phpfreaks.com/topic/125571-solved-lost-on-how-to-troubleshoot/ Share on other sites More sharing options...
ratcateme Posted September 24, 2008 Share Posted September 24, 2008 post us some of the code so we can help you Scott. Quote Link to comment https://forums.phpfreaks.com/topic/125571-solved-lost-on-how-to-troubleshoot/#findComment-649253 Share on other sites More sharing options...
maddcow26 Posted September 24, 2008 Author Share Posted September 24, 2008 Thanks. This is the code for the page <link href="qform.css" rel="stylesheet" type="text/css"> <?php #2008 survey if (isset($_POST['submitted'])) { $errors = array(); //initialize error array. if (empty($_POST['burlap'])) { $errors[] = 'You did not enter your age.'; } if (empty($_POST['gender'])) { $errors[] = 'Please indicate your gender.'; } if (empty($_POST['primarystyle'])) { $errors[] = 'You did not enter your primary martial art.'; } if (empty($_POST['yearsprimary'])) { $errors[] = 'You did not enter the number of years training you have in your primary martial art.'; } if (empty($_POST['yearsgrappling'])) { $errors[] = 'You did not enter the number of years grappling experience you have.'; } if (empty($_POST['weekly'])) { $errors[] = 'Please indicate the number of weekly training sessions you participate in.'; } if (empty($_POST['visitorsince'])) { $errors[] = 'Please tell us how long you have been visiting this site.'; } if (empty($_POST['dvdpurchase'])) { $errors[] = 'You forgot to indicate the number of DVDs you have purchased.'; } if (empty($erros)){ //if all is error-free //then let's insert to database require_once ('../includes/mysql_connect.php'); $query = "INSERT INTO formresults (qname, qemail, qaddress, burlap, gender, primarystyle, yearsprimary, yearsgrappling, weekly, stephanquestion, visitorsince, dvdpurchase) VALUES ('qname', 'qemail', 'qaddress', 'burlap', 'gender', 'primarystyle', 'yearsprimary', 'yearsgrappling', 'weekly', 'stephanquestion', 'visitorsince', 'dvdpurchase')"; $result = @mysql_query ($query); if ($result) { echo '<h1 id="mainhead"> Thank You! </h1> <p> Your results have been included in our study. Please enjoy the rest of your visit to grapplearts.com </p>'; exit(); } else { echo '<h1 id="mainhead">System Error</h1> <p class="error"> Your submission could not be entered due to a server error. We apologize for the inconvenience.</p>'; echo '<p>' . mysql_error() . '<br /><br />Query: ' . $query . '</p>'; exit(); } mysql_close(); } else { echo '<h1 id="mainhead">Error!</h1> <p class="error">The following error(s) occured: <br />'; foreach ($errors as $msg) { echo " - $msg<br />\n"; } echo '</p><p>Please try again. </p><p><br /></p>'; } } ?> <html> <table border="0"> <tr> <td width=20%> </td> <td width="60%" valign="top"> <form action="2008GrappleartsSurvey.php" method="post" name="2008q" > <div align="center"><span class="qheading">Grapplearts 2008 Questionnaire</span></div> <blockquote> <p>Thank you for taking the time to help us with our research. The information we receive from you, the MMA community, will help us ensure that we can continue to provide the best in tailored content and instructional resources on the web as well as our DVD catalogue.</p> <p><input name="qname" type="text" size="32" maxlength="32" /><br /> Your Name (optional)</p> <p><input name="qemail" type="text" value="" size="32" maxlength="32" /> <br /> Your Email (optional)</p> <p><textarea name="qaddress" cols="25" rows="5"></textarea> <br /> Shipping Address (optional)</p> <p><input name="burlap" type="text" size="32" maxlength="2" /> <br /> Your Age (Ex. 24) </p> <p> <select name="gender"> <p> <option> I am female </option> <option selected> I am male </option> </select> <br /> Your Gender</p> <p><select name="primarystyle"> <option selected>Please Select Best Choice</option> <option>Submission Wrestling</option> <option>Mixed Martial Arts</option> <option>Wrestling</option> <option>Boxing</option> <option>Chinese Martial Arts (Trad.)</option> <option>Filipino/Indonesian Martial Arts</option> <option>Japanese Martial Arts (Traditional)</option> <option>JKD</option> <option>Judo</option> <option>Kickboxing / Muay Thai</option> <option>Korean Martial Arts</option> <option>Other</option> </select> <br /> Your Primary Martial Art </p> <p> <input name="yearsprimary" type="text" id="years primary" size="32" maxlength="3" /> <br /> Years trained in primary martial art<br /> (Less that one year, enter 0.5) </p> <p> <input name="yearsgrappling" type="text" id="years grappling" size="32" maxlength="3" /><br /> Years trained in grappling <br /> (Less than one year, enter 0.5 </p> <p> <input name="weekly" type="text" id="years grappling" size="32" maxlength="3" /><br /> Number of weekly Martial Arts training sessions.</p> <p> <textarea name="stephanquestion" cols="25" rows="5"></textarea><br /> The single question about grappling you would most like to see Stephan Kesting answer.</p> <p> <textarea name="stephanquestion" cols="25" rows="5"></textarea><br /> The subject or topic you would most like to see covered in a future DVD release.</p> <p><select name="visitorsince" id="visitorsince" > <option selected>Joined less than one month ago</option> <option>one month to one year ago</option> <option>one year to three years ago </option> <option>more than three years ago</option> </select> <br /> I first visited grapplearts.com....</p> <p> <select name="dvdpurchase"> <option selected> One DVD </option> <option> Two DVDs</option> <option> Three DVDs</option> <option> Four DVDs</option> <option>Five DVDs </option> <option>Six DVDs </option> <option>Seven DVDs </option> <option>All Eight DVDs</option></select> <br />How many Grapplearts DVDs have you purchased? (Here or elsewhere. Please enter a number) </p> <p> <input name ="submit" type="submit" value="Submit Answers" /> </p> <p> <input name="reset" type="reset" value=" Clear All Info " /> </p> <p> </p> </blockquote> </form> </td> <td width="20%"></td> </tr> </table> </html> Quote Link to comment https://forums.phpfreaks.com/topic/125571-solved-lost-on-how-to-troubleshoot/#findComment-649502 Share on other sites More sharing options...
Maq Posted September 24, 2008 Share Posted September 24, 2008 Put: error_reporting(E_ALL); ini_set('error_reporting', E_ALL); At the top of your page and it will display errors. And: or die("WTF?!" . mysql_error()); After your SQL statements. Quote Link to comment https://forums.phpfreaks.com/topic/125571-solved-lost-on-how-to-troubleshoot/#findComment-649507 Share on other sites More sharing options...
maddcow26 Posted September 24, 2008 Author Share Posted September 24, 2008 Still reloads the blank form afterwards with no errors. is the following where you wanted the second snippet? $query = "INSERT INTO formresults (qname, qemail, qaddress, burlap, gender, primarystyle, yearsprimary, yearsgrappling, weekly, stephanquestion, visitorsince, dvdpurchase) VALUES ('qname', 'qemail', 'qaddress', 'burlap', 'gender', 'primarystyle', 'yearsprimary', 'yearsgrappling', 'weekly', 'stephanquestion', 'visitorsince', 'dvdpurchase')"; $result = @mysql_query ($query) //maq suggestion or die("WTF?!" . mysql_error()); //maq done 2 if ($result) { Quote Link to comment https://forums.phpfreaks.com/topic/125571-solved-lost-on-how-to-troubleshoot/#findComment-649517 Share on other sites More sharing options...
Maq Posted September 24, 2008 Share Posted September 24, 2008 No, first snippet: error_reporting(E_ALL); ini_set('error_reporting', E_ALL); if (isset($_POST['submitted'])) { $errors = array(); //initialize error array. if (empty($_POST['burlap'])) { Second snippet like this, for every MySQL query you want to display errors (if there are any): $query = "INSERT INTO formresults (qname, qemail, qaddress, burlap, gender, primarystyle, yearsprimary, yearsgrappling, weekly, stephanquestion, visitorsince, dvdpurchase) VALUES ('qname', 'qemail', 'qaddress', 'burlap', 'gender', 'primarystyle', 'yearsprimary', 'yearsgrappling', 'weekly', 'stephanquestion', 'visitorsince', 'dvdpurchase') or die(mysql_error())"; Quote Link to comment https://forums.phpfreaks.com/topic/125571-solved-lost-on-how-to-troubleshoot/#findComment-649522 Share on other sites More sharing options...
maddcow26 Posted September 24, 2008 Author Share Posted September 24, 2008 thanks. Got it in the right spot now. it returned error: Parse error: syntax error, unexpected T_IF in /home/jgrapple/public_html/2008GrappleartsSurvey.php on line 49 line 49: if ($result) { in context below: 'yearsgrappling', 'weekly', 'stephanquestion', 'visitorsince', 'dvdpurchase') or die(mysql_error())"; $result = @mysql_query ($query) if ($result) { echo '<h1 id="mainhead"> Thank You! </h1> <p> Your results have been included in our study. Please enjoy the rest of your visit to grapplearts.com </p>'; exit(); Quote Link to comment https://forums.phpfreaks.com/topic/125571-solved-lost-on-how-to-troubleshoot/#findComment-649540 Share on other sites More sharing options...
Maq Posted September 24, 2008 Share Posted September 24, 2008 Replace this line with this: $result = @mysql_query ($query); You were missing a semi-colon after this line. Quote Link to comment https://forums.phpfreaks.com/topic/125571-solved-lost-on-how-to-troubleshoot/#findComment-649554 Share on other sites More sharing options...
maddcow26 Posted September 24, 2008 Author Share Posted September 24, 2008 :-\ doh! Thanks for spending the time to help me with my n00b issues maq, I appreciate it. Fixing that line now. Quote Link to comment https://forums.phpfreaks.com/topic/125571-solved-lost-on-how-to-troubleshoot/#findComment-649557 Share on other sites More sharing options...
DarkWater Posted September 24, 2008 Share Posted September 24, 2008 Maq, you told him to put the or die() thing on the wrong line... It should actually read: 'yearsgrappling', 'weekly', 'stephanquestion', 'visitorsince', 'dvdpurchase')"; $result = mysql_query ($query) or die(mysql_error()); //HERE if ($result) { echo '<h1 id="mainhead"> Thank You! </h1> <p> Your results have been included in our study. Please enjoy the rest of your visit to grapplearts.com </p>'; exit(); Also, remove every single @ in your code before a function name. Quote Link to comment https://forums.phpfreaks.com/topic/125571-solved-lost-on-how-to-troubleshoot/#findComment-649558 Share on other sites More sharing options...
Maq Posted September 24, 2008 Share Posted September 24, 2008 Maq, you told him to put the or die() thing on the wrong line... I wouldn't call it wrong, you can put it on that line and it will still return error feedback. maddcow26, glad I could help, let me know if the fixes DarkWater and I posted got your script to work. Quote Link to comment https://forums.phpfreaks.com/topic/125571-solved-lost-on-how-to-troubleshoot/#findComment-649561 Share on other sites More sharing options...
DarkWater Posted September 24, 2008 Share Posted September 24, 2008 It would do ABSOLUTELY nothing on the line you told him to put it on. Quote Link to comment https://forums.phpfreaks.com/topic/125571-solved-lost-on-how-to-troubleshoot/#findComment-649565 Share on other sites More sharing options...
maddcow26 Posted September 24, 2008 Author Share Posted September 24, 2008 changed the code to DarkWater's suggestion. I still get the blank form on submit and no info is being written to the db <link href="qform.css" rel="stylesheet" type="text/css"> <?php #2008 survey // maq suggestion error_reporting(E_ALL); ini_set('error_reporting', E_ALL); //maq done 1 if (isset($_POST['submitted'])) { $errors = array(); //initialize error array. if (empty($_POST['burlap'])) { $errors[] = 'You did not enter your age.'; } if (empty($_POST['gender'])) { $errors[] = 'Please indicate your gender.'; } if (empty($_POST['primarystyle'])) { $errors[] = 'You did not enter your primary martial art.'; } if (empty($_POST['yearsprimary'])) { $errors[] = 'You did not enter the number of years training you have in your primary martial art.'; } if (empty($_POST['yearsgrappling'])) { $errors[] = 'You did not enter the number of years grappling experience you have.'; } if (empty($_POST['weekly'])) { $errors[] = 'Please indicate the number of weekly training sessions you participate in.'; } if (empty($_POST['visitorsince'])) { $errors[] = 'Please tell us how long you have been visiting this site.'; } if (empty($_POST['dvdpurchase'])) { $errors[] = 'You forgot to indicate the number of DVDs you have purchased.'; } if (empty($erros)){ //if all is error-free //then let's insert to database require_once ('../includes/mysql_connect.php'); $query = "INSERT INTO formresults (qname, qemail, qaddress, burlap, gender, primarystyle, yearsprimary, yearsgrappling, weekly, stephanquestion, visitorsince, dvdpurchase) VALUES ('qname', 'qemail', 'qaddress', 'burlap', 'gender', 'primarystyle', 'yearsprimary', 'yearsgrappling', 'weekly', 'stephanquestion', 'visitorsince', 'dvdpurchase')"; $result = mysql_query ($query) or die(mysql_error()); //HERE if ($result) { echo '<h1 id="mainhead"> Thank You! </h1> <p> Your results have been included in our study. Please enjoy the rest of your visit to grapplearts.com </p>'; exit(); } else { echo '<h1 id="mainhead">System Error</h1> <p class="error"> Your submission could not be entered due to a server error. We apologize for the inconvenience.</p>'; echo '<p>' . mysql_error() . '<br /><br />Query: ' . $query . '</p>'; exit(); } mysql_close(); } else { echo '<h1 id="mainhead">Error!</h1> <p class="error">The following error(s) occured: <br />'; foreach ($errors as $msg) { echo " - $msg<br />\n"; } echo '</p><p>Please try again. </p><p><br /></p>'; } } ?> <html> <table border="0"> <tr> <td width=20%> </td> <td width="60%" valign="top"> <form action="2008GrappleartsSurvey.php" method="post" name="2008q" > <div align="center"><span class="qheading">Grapplearts 2008 Questionnaire</span></div> <blockquote> <p>Thank you for taking the time to help us with our research. The information we receive from you, the MMA community, will help us ensure that we can continue to provide the best in tailored content and instructional resources on the web as well as our DVD catalogue.</p> <p><input name="qname" type="text" size="32" maxlength="32" /><br /> Your Name (optional)</p> <p><input name="qemail" type="text" value="" size="32" maxlength="32" /> <br /> Your Email (optional)</p> <p><textarea name="qaddress" cols="25" rows="5"></textarea> <br /> Shipping Address (optional)</p> <p><input name="burlap" type="text" size="32" maxlength="2" /> <br /> Your Age (Ex. 24) </p> <p> <select name="gender"> <p> <option> I am female </option> <option selected> I am male </option> </select> <br /> Your Gender</p> <p><select name="primarystyle"> <option selected>Please Select Best Choice</option> <option>Submission Wrestling</option> <option>Mixed Martial Arts</option> <option>Wrestling</option> <option>Boxing</option> <option>Chinese Martial Arts (Trad.)</option> <option>Filipino/Indonesian Martial Arts</option> <option>Japanese Martial Arts (Traditional)</option> <option>JKD</option> <option>Judo</option> <option>Kickboxing / Muay Thai</option> <option>Korean Martial Arts</option> <option>Other</option> </select> <br /> Your Primary Martial Art </p> <p> <input name="yearsprimary" type="text" id="years primary" size="32" maxlength="3" /> <br /> Years trained in primary martial art<br /> (Less that one year, enter 0.5) </p> <p> <input name="yearsgrappling" type="text" id="years grappling" size="32" maxlength="3" /><br /> Years trained in grappling <br /> (Less than one year, enter 0.5 </p> <p> <input name="weekly" type="text" id="years grappling" size="32" maxlength="3" /><br /> Number of weekly Martial Arts training sessions.</p> <p> <textarea name="stephanquestion" cols="25" rows="5"></textarea><br /> The single question about grappling you would most like to see Stephan Kesting answer.</p> <p> <textarea name="stephanquestion" cols="25" rows="5"></textarea><br /> The subject or topic you would most like to see covered in a future DVD release.</p> <p><select name="visitorsince" id="visitorsince" > <option selected>Joined less than one month ago</option> <option>one month to one year ago</option> <option>one year to three years ago </option> <option>more than three years ago</option> </select> <br /> I first visited grapplearts.com....</p> <p> <select name="dvdpurchase"> <option selected> One DVD </option> <option> Two DVDs</option> <option> Three DVDs</option> <option> Four DVDs</option> <option>Five DVDs </option> <option>Six DVDs </option> <option>Seven DVDs </option> <option>All Eight DVDs</option></select> <br />How many Grapplearts DVDs have you purchased? (Here or elsewhere. Please enter a number) </p> <p> <input name ="submit" type="submit" value="Submit Answers" /> </p> <p> <input name="reset" type="reset" value=" Clear All Info " /> </p> <p> </p> </blockquote> </form> </td> <td width="20%"></td> </tr> </table> </html> Quote Link to comment https://forums.phpfreaks.com/topic/125571-solved-lost-on-how-to-troubleshoot/#findComment-649567 Share on other sites More sharing options...
Porl123 Posted September 24, 2008 Share Posted September 24, 2008 if (empty($erros)){ //if all is error-free You weren't asking this I think but did you mean to put $errors there instead of $erros? Quote Link to comment https://forums.phpfreaks.com/topic/125571-solved-lost-on-how-to-troubleshoot/#findComment-649569 Share on other sites More sharing options...
Maq Posted September 24, 2008 Share Posted September 24, 2008 It would do ABSOLUTELY nothing on the line you told him to put it on. Heh, sorry DarkWater. I thought I used it before and it gave feedback but I just tested it and you were right... :-X Quote Link to comment https://forums.phpfreaks.com/topic/125571-solved-lost-on-how-to-troubleshoot/#findComment-649571 Share on other sites More sharing options...
DarkWater Posted September 24, 2008 Share Posted September 24, 2008 He gave you the wrong lines for suggestion one. Change them to: ini_set('display_errors', 1); error_reporting(E_ALL); That should show you the errors. Quote Link to comment https://forums.phpfreaks.com/topic/125571-solved-lost-on-how-to-troubleshoot/#findComment-649572 Share on other sites More sharing options...
maddcow26 Posted September 24, 2008 Author Share Posted September 24, 2008 nope, still not showing any erros Quote Link to comment https://forums.phpfreaks.com/topic/125571-solved-lost-on-how-to-troubleshoot/#findComment-649575 Share on other sites More sharing options...
DarkWater Posted September 24, 2008 Share Posted September 24, 2008 Can I see the current code? Quote Link to comment https://forums.phpfreaks.com/topic/125571-solved-lost-on-how-to-troubleshoot/#findComment-649580 Share on other sites More sharing options...
maddcow26 Posted September 24, 2008 Author Share Posted September 24, 2008 You bet, thanks for looking: <link href="qform.css" rel="stylesheet" type="text/css"> <?php #2008 survey ini_set('display_errors', 1); error_reporting(E_ALL); if (isset($_POST['submitted'])) { $errors = array(); //initialize error array. if (empty($_POST['burlap'])) { $errors[] = 'You did not enter your age.'; } if (empty($_POST['gender'])) { $errors[] = 'Please indicate your gender.'; } if (empty($_POST['primarystyle'])) { $errors[] = 'You did not enter your primary martial art.'; } if (empty($_POST['yearsprimary'])) { $errors[] = 'You did not enter the number of years training you have in your primary martial art.'; } if (empty($_POST['yearsgrappling'])) { $errors[] = 'You did not enter the number of years grappling experience you have.'; } if (empty($_POST['weekly'])) { $errors[] = 'Please indicate the number of weekly training sessions you participate in.'; } if (empty($_POST['visitorsince'])) { $errors[] = 'Please tell us how long you have been visiting this site.'; } if (empty($_POST['dvdpurchase'])) { $errors[] = 'You forgot to indicate the number of DVDs you have purchased.'; } if (empty($errors)){ //if all is error-free //then let's insert to database require_once ('../includes/mysql_connect.php'); $query = "INSERT INTO formresults (qname, qemail, qaddress, burlap, gender, primarystyle, yearsprimary, yearsgrappling, weekly, stephanquestion, visitorsince, dvdpurchase) VALUES ('qname', 'qemail', 'qaddress', 'burlap', 'gender', 'primarystyle', 'yearsprimary', 'yearsgrappling', 'weekly', 'stephanquestion', 'visitorsince', 'dvdpurchase')"; $result = mysql_query ($query) or die(mysql_error()); //HERE if ($result) { echo '<h1 id="mainhead"> Thank You! </h1> <p> Your results have been included in our study. Please enjoy the rest of your visit to grapplearts.com </p>'; exit(); } else { echo '<h1 id="mainhead">System Error</h1> <p class="error"> Your submission could not be entered due to a server error. We apologize for the inconvenience.</p>'; echo '<p>' . mysql_error() . '<br /><br />Query: ' . $query . '</p>'; exit(); } mysql_close(); } else { echo '<h1 id="mainhead">Error!</h1> <p class="error">The following error(s) occured: <br />'; foreach ($errors as $msg) { echo " - $msg<br />\n"; } echo '</p><p>Please try again. </p><p><br /></p>'; } } ?> <html> <table border="0"> <tr> <td width=20%> </td> <td width="60%" valign="top"> <form action="2008GrappleartsSurvey.php" method="post" name="2008q" > <div align="center"><span class="qheading">Grapplearts 2008 Questionnaire</span></div> <blockquote> <p>Thank you for taking the time to help us with our research. The information we receive from you, the MMA community, will help us ensure that we can continue to provide the best in tailored content and instructional resources on the web as well as our DVD catalogue.</p> <p><input name="qname" type="text" size="32" maxlength="32" /><br /> Your Name (optional)</p> <p><input name="qemail" type="text" value="" size="32" maxlength="32" /> <br /> Your Email (optional)</p> <p><textarea name="qaddress" cols="25" rows="5"></textarea> <br /> Shipping Address (optional)</p> <p><input name="burlap" type="text" size="32" maxlength="2" /> <br /> Your Age (Ex. 24) </p> <p> <select name="gender"> <p> <option> I am female </option> <option selected> I am male </option> </select> <br /> Your Gender</p> <p><select name="primarystyle"> <option selected>Please Select Best Choice</option> <option>Submission Wrestling</option> <option>Mixed Martial Arts</option> <option>Wrestling</option> <option>Boxing</option> <option>Chinese Martial Arts (Trad.)</option> <option>Filipino/Indonesian Martial Arts</option> <option>Japanese Martial Arts (Traditional)</option> <option>JKD</option> <option>Judo</option> <option>Kickboxing / Muay Thai</option> <option>Korean Martial Arts</option> <option>Other</option> </select> <br /> Your Primary Martial Art </p> <p> <input name="yearsprimary" type="text" id="years primary" size="32" maxlength="3" /> <br /> Years trained in primary martial art<br /> (Less that one year, enter 0.5) </p> <p> <input name="yearsgrappling" type="text" id="years grappling" size="32" maxlength="3" /><br /> Years trained in grappling <br /> (Less than one year, enter 0.5 </p> <p> <input name="weekly" type="text" id="years grappling" size="32" maxlength="3" /><br /> Number of weekly Martial Arts training sessions.</p> <p> <textarea name="stephanquestion" cols="25" rows="5"></textarea><br /> The single question about grappling you would most like to see Stephan Kesting answer.</p> <p> <textarea name="stephanquestion" cols="25" rows="5"></textarea><br /> The subject or topic you would most like to see covered in a future DVD release.</p> <p><select name="visitorsince" id="visitorsince" > <option selected>Joined less than one month ago</option> <option>one month to one year ago</option> <option>one year to three years ago </option> <option>more than three years ago</option> </select> <br /> I first visited grapplearts.com....</p> <p> <select name="dvdpurchase"> <option selected> 1 </option> <option> 2</option> <option> 3</option> <option> 4</option> <option>5 </option> <option>6 </option> <option>7 </option> <option>8</option></select> <br />How many Grapplearts DVDs have you purchased? (Here or elsewhere. Please enter a number) </p> <p> <input name ="submit" type="submit" value="Submit Answers" /> </p> <p> <input name="reset" type="reset" value=" Clear All Info " /> </p> <p> </p> </blockquote> </form> </td> <td width="20%"></td> </tr> </table> </html> Quote Link to comment https://forums.phpfreaks.com/topic/125571-solved-lost-on-how-to-troubleshoot/#findComment-649581 Share on other sites More sharing options...
maddcow26 Posted September 24, 2008 Author Share Posted September 24, 2008 I double-checked my php.ini file and errors are set to all. My db connection also works just fine. Absolutely lost as to why this isn't working and won't show me any errors. Quote Link to comment https://forums.phpfreaks.com/topic/125571-solved-lost-on-how-to-troubleshoot/#findComment-649638 Share on other sites More sharing options...
maddcow26 Posted September 24, 2008 Author Share Posted September 24, 2008 Ok, finally got the error issue squared away. The problem was related to my submit button. I was posting 'submit' but looking for post 'submitted.' It's now picking up errors and telling visitors to fill out necessary fields if they miss them. Unfortunately, when you fill it out properly, I get the error: Could not connect to MySQL: Access denied for user 'username'@'localhost' (using password: YES) I have it set to look to a separate file for the connection info require_once ('../includes/mysql_connect.php'); this line is right above my insert. anyone see anything wrong with that? the info in the mysql_connect.php file is correct with the actual user and password Quote Link to comment https://forums.phpfreaks.com/topic/125571-solved-lost-on-how-to-troubleshoot/#findComment-649693 Share on other sites More sharing options...
Maq Posted September 24, 2008 Share Posted September 24, 2008 Yeah, it means your username IS "username". You need to change it to root or w/e it is. Quote Link to comment https://forums.phpfreaks.com/topic/125571-solved-lost-on-how-to-troubleshoot/#findComment-649800 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.