andrew_biggart Posted February 14, 2009 Share Posted February 14, 2009 This is really bugging the shit out of me, its just a simple php registration process but when i submit the form im getting that dam blanc screen, i know it will be something silly but my eyes are failing to see it!! anyone notice anything purcular? Thanks in advance <? include("config_members.php"); $Username = ($_POST['Username']); $Password = ($_POST['Password']); $Email = ($_POST['Email']); $Location = ($_POST['Location']); $Fav = ($_POST['Fav']); $Quote = ($_POST['Quote']); $Interests = ($_POST['Interests']); $Happy = ($_POST['Happy']); $Sad = ($_POST['Sad']); $Habits = ($_POST['Habits']); $Music = ($_POST['Music']); $Movie = ($_POST['Movie']); $Website = ($_POST['Website']); $Aboutme = ($_POST['Aboutme']); $Whywe = ($_POST['Whywe']); $sql = "INSERT INTO User_infoT ( Username, Password, Email, Location, Fav, Quote, Interests, Happy, Sad, Habits, Music, Movie, Website, Aboutme, Whywe) VALUES( '$Username','$Password', '$Email', '$Location', '$Fav', '$Quote', '$Interests', '$Happy', '$Sad', '$Habits' , '$Music', '$Movie', '$Website', '$Aboutme', '$Whywe' )"; $result=mysql_query($sql); if($result){ echo "<h1 class=contact_us2>Successful, you are now a registered member of www.weloveweed.co.uk, welcome to the family"</h1>; echo "<BR>"; echo "<h1 class=contact_us2>You are now able to login, <a href="default.php">Click hear</a></h1>"; } else { echo "<h1 class=contact_us>ERROR, please try again and insure you have filled in all *required fields, Thank you</h1>"; } // close connection mysql_close(); ?> Quote Link to comment https://forums.phpfreaks.com/topic/145187-solved-fresh-eyes-required/ Share on other sites More sharing options...
Mchl Posted February 14, 2009 Share Posted February 14, 2009 add error_reporting(E_ALL); ini_set("display_errors",TRUE); just after starting <? oh... and by the way, change <? to <?php Quote Link to comment https://forums.phpfreaks.com/topic/145187-solved-fresh-eyes-required/#findComment-762044 Share on other sites More sharing options...
MasterACE14 Posted February 14, 2009 Share Posted February 14, 2009 is the file fully uploading onto the webhost? Quote Link to comment https://forums.phpfreaks.com/topic/145187-solved-fresh-eyes-required/#findComment-762045 Share on other sites More sharing options...
andrew_biggart Posted February 14, 2009 Author Share Posted February 14, 2009 Yea i have uploaded it onto the web server its just being really annoying grrrrr Quote Link to comment https://forums.phpfreaks.com/topic/145187-solved-fresh-eyes-required/#findComment-762047 Share on other sites More sharing options...
andrew_biggart Posted February 14, 2009 Author Share Posted February 14, 2009 Tried this and its not bringing up any errors just that forking blanc screen !!! <?php error_reporting(E_ALL); ini_set("display_errors",TRUE); include("config_members.php"); $Username = ($_POST['Username']); $Password = ($_POST['Password']); $Email = ($_POST['Email']); $Location = ($_POST['Location']); $Fav = ($_POST['Fav']); $Quote = ($_POST['Quote']); $Interests = ($_POST['Interests']); $Happy = ($_POST['Happy']); $Sad = ($_POST['Sad']); $Habits = ($_POST['Habits']); $Music = ($_POST['Music']); $Movie = ($_POST['Movie']); $Website = ($_POST['Website']); $Aboutme = ($_POST['Aboutme']); $Whywe = ($_POST['Whywe']); $sql = "INSERT INTO User_infoT ( Username, Password, Email, Location, Fav, Quote, Interests, Happy, Sad, Habits, Music, Movie, Website, Aboutme, Whywe) VALUES( '$Username','$Password', '$Email', '$Location', '$Fav', '$Quote', '$Interests', '$Happy', '$Sad', '$Habits' , '$Music', '$Movie', '$Website', '$Aboutme', '$Whywe' )"; $result=mysql_query($sql); if($result){ echo "<h1 class=contact_us2>Successful, you are now a registered member of www.weloveweed.co.uk, welcome to the family"</h1>; echo "<BR>"; echo "<h1 class=contact_us2>You are now able to login, <a href="default.php">Click hear</a></h1>"; } else { echo "<h1 class=contact_us>ERROR, please try again and insure you have filled in all *required fields, Thank you</h1>"; } // close connection mysql_close(); ?> Quote Link to comment https://forums.phpfreaks.com/topic/145187-solved-fresh-eyes-required/#findComment-762049 Share on other sites More sharing options...
Mchl Posted February 14, 2009 Share Posted February 14, 2009 Try changing $result=mysql_query($sql); to $result=mysql_query($sql) or die(mysql_error().": $sql"); This will display MySQL errors if any occur. Quote Link to comment https://forums.phpfreaks.com/topic/145187-solved-fresh-eyes-required/#findComment-762050 Share on other sites More sharing options...
andrew_biggart Posted February 14, 2009 Author Share Posted February 14, 2009 Ok it having real trouble now i actually cant fiqure this shit out. The php code is this; <?php include("config_members.php"); $Username = ($_POST['Username']); $Password = ($_POST['Password']); $Email = ($_POST['Email']); $Location = ($_POST['Location']); $Fav = ($_POST['Fav']); $Quote = ($_POST['Quote']); $Interests = ($_POST['Interests']); $Happy = ($_POST['Happy']); $Sad = ($_POST['Sad']); $Habits = ($_POST['Habits']); $Music = ($_POST['Music']); $Movie = ($_POST['Movie']); $Website = ($_POST['Website']); $Aboutme = ($_POST['Aboutme']); $Whywe = ($_POST['Whywe']); $sql = "INSERT INTO User_infoT ( Username, Password, Email, Location, Fav, Quote, Interests, Happy, Sad, Habits, Music, Movie, Website, Aboutme, Whywe) VALUES( '$Username','$Password', '$Email', '$Location', '$Fav', '$Quote', '$Interests', '$Happy', '$Sad', '$Habits' , '$Music', '$Movie', '$Website', '$Aboutme', '$Whywe' )"; $result=mysql_query($sql) or die(mysql_error().": $sql"); if($result){ echo "<h1 class=contact_us2>Successful, you are now a registered member of www.weloveweed.co.uk, welcome to the family"</h1>; echo "<BR>"; echo "<h1 class=contact_us2>You are now able to login, <a href="default.php">Click hear</a></h1>"; } else { echo "<h1 class=contact_us>ERROR, please try again and insure you have filled in all *required fields, Thank you</h1>"; } // close connection mysql_close(); ?> and the html is this !! <form method="post" action="user_register_submit.php"> <table class="profileforum"> <tr><td class="forum1"> <table> <tr><td class="reg_headers">Username :</td><td class="maxleft"> <input name="Username" id="Username" type="text" maxlength="16 "value="Make your own up" /> Max 16 characters </td></tr> <tr><td class="reg_headers">Password :</td><td class="maxleft"> <input name="Password" id="Password" type="password" maxlength="8" /> Max 8 characters</td></tr> <tr><td class="reg_headers">Email address :</td><td> <input name="Email" id="Email" type="text" value="Must be valid" /> </td></tr> </table> </td></tr> </table> <br /> <table class="profileforum"> <tr><td class="forum1"> <table> <tr><td class="reg_headers">Location :</td><td> <input name="Location" id="Location" type="text" value="Where your from" /></td></tr> <tr><td class="reg_headers">Favourite Smoking method :</td><td> <select name="Fav" id="Fav"style="width: 126px"> <option>Choose</option> <option>Joint</option> <option>Blunt</option> <option>Tulip</option> <option>Bong</option> <option>Lung</option> <option>Bucket</option> </select></td></tr> <tr><td class="reg_headers">Favourite quote :</td><td class="maxleft"> <input name="Quote" id="Quote"type="text" style="width: 246px" maxlength="50 "value="Words of wisdom" /> Max 50 characters</td> </tr> <tr><td class="reg_headers" style="width: 200px" valign="top">About me : </td><td> <textarea name="Aboutme" id="Aboutme" style="width: 415px; height: 135px" >Write a little about yourself</textarea> </td></tr> <tr><td class="reg_headers" style="width: 200px" valign="top">Why do you love weed? : </td><td> <textarea name="Whywe" id="Whywe" style="width: 415px; height: 135px" >Give a short reason why you love weed so others can read it on your profile</textarea> </td></tr> </table> </td></tr> </table> <br /> <table class="profileforum"> <tr><td class="forum1"> <table> <tr><td class="reg_headers">Interests :</td><td class="maxleft"> <input name="Interests" id="Interests" type="text" style="width: 246px" /> Max 50 characters</td></tr> <tr><td class="reg_headers">What makes you happy? :</td><td class="maxleft"> <input name="Happy" id="Happy"type="text" style="width: 246px" /> Max 70 characters</td></tr> <tr><td class="reg_headers">What makes you sad? :</td><td class="maxleft"> <input name="Sad" id="Sad"type="text" style="width: 246px" /> Max 70 characters</td> </tr> <tr><td class="reg_headers" style="width: 200px" valign="top">Bad habits : </td><td class="maxleft"> <input name="Habits" id="Habits"type="text" style="width: 246px" /> Max 60 characters </td></tr> </table> </td></tr> </table> <br /> <table class="profileforum"> <tr><td class="forum1"> <table> <tr><td class="reg_headers">Music :</td><td class="maxleft"> <select id="Music"name="Music" style="width: 126px"> <option>Choose</option> <option>Dance</option> <option>RnB</option> <option>Funky House</option> <option>Indie</option> <option>Rock</option> <option>Electro</option> <option>Chillout</option> </select></td></tr> <tr><td class="reg_headers">Movie :</td><td class="maxleft"> <input name="Movie" id="Movie"type="text" style="width: 246px" /> Max 100 characters</td></tr> <tr><td class="Website">Website :</td><td class="maxleft"> <input name="Quote" id="Quote"type="text" style="width: 246px" /> No spamming</td> </tr> </table> </td></tr> </table> <br /> <table class="profileforum"> <tr><td class="forum1"> <table> <tr><td class="reg_headers">Update your status : </td><td> <input name="regstatus"type="text" maxlength="50" style="width: 419px" value="What are you doing right now?" /> </td></tr> <tr><td class="maxright">Max 50 characters </td></tr> <tr><td> </td><td class="style1"> </td></tr> </table> <table> <tr><td class="reg_headers">Upload a profile picture : </td><td> <input name="File1" type="file" style="width: 248px" /> </td></tr> <tr><td class="maxright">Max size 100px X 100px </td></tr> </table> </td></tr> </table> <br /> <br /> <table class="profileforum"> <tr><td class="forum1"> <table> <tr><td class="terms"><h1 class="subcats">Terms & Conditions</h1> I hereby solemnly declare that once I have received my keys to the weloveweed mansion I will not act like a demented retard, cock slurping, member abusing, page spamming slut. I will respect my new online home as if I was in my own home. I will not post shit all over the walls, abuse or bully my family members or leave porn, and useless links lying around everywhere.<br /> <br /> I declare that I will try my best to donate new content to the site and upload as much cool things as I come across while browsing the web. <br /> <br /> And most of all I agree to enjoy this site to its full extent, have as much fun as possible and treat it like my own!<br /> <br /> <br /> <h1 class="subcats">Important Information</h1> By Clicking the box below and submitting your details means that you agree to our <a href="terms_conditions.htm">Terms & Conditions</a><h1 class="accept"> <input type="checkbox" style="width:16px;" onclick="if(this.checked==1)document.getElementById('register').disabled='';else document.getElementById('register').disabled='disabled';" value="" name="accept" />Accept that shit !</h1> </td></tr> </table> </td></tr> </table> <br /> <table class="profileforum"> <tr><td class="forum1"> <table> <tr><td class="style1"><input name="regreset" type="reset" value="D'oh" /> <input id="register" name="register" type="submit" value="Join the mansion" disabled="disabled" /> </td></tr> </table> </td></tr> </table> <br /> <br /> </form> Please help Quote Link to comment https://forums.phpfreaks.com/topic/145187-solved-fresh-eyes-required/#findComment-762060 Share on other sites More sharing options...
Mchl Posted February 14, 2009 Share Posted February 14, 2009 Still displays nothing? Add phpinfo(); at the beginning and tell us if it shows anything at all. Quote Link to comment https://forums.phpfreaks.com/topic/145187-solved-fresh-eyes-required/#findComment-762063 Share on other sites More sharing options...
andrew_biggart Posted February 14, 2009 Author Share Posted February 14, 2009 Again absoultly nothing this is depressing lol Quote Link to comment https://forums.phpfreaks.com/topic/145187-solved-fresh-eyes-required/#findComment-762067 Share on other sites More sharing options...
Solar Posted February 14, 2009 Share Posted February 14, 2009 $sql = "INSERT INTO User_infoT ( Username, Password, Email, Location, Fav, Quote, Interests, Happy, Sad, Habits, Music, Movie, Website, Aboutme, Whywe) VALUES( '$Username','$Password', '$Email', '$Location', '$Fav', '$Quote', '$Interests', '$Happy', '$Sad', '$Habits' , '$Music', '$Movie', '$Website', '$Aboutme', '$Whywe' )"; Im just wondering See your values? After that you have written VALUES. So I'm just confused.. Which is your Values? This; Username, Password, Email, Location, Fav, Quote, Interests, Happy, Sad, Habits, Music, Movie, Website, Aboutme, Whywe OR This; VALUES Quote Link to comment https://forums.phpfreaks.com/topic/145187-solved-fresh-eyes-required/#findComment-762069 Share on other sites More sharing options...
Mchl Posted February 14, 2009 Share Posted February 14, 2009 Either you're calling wrong file (check filename) from your form, you have not uploaded the file to your server after changing it (common reason for strange bugs), or your server does not work properly. Solar: this is correct MySQL syntax. Look it up in manual. Quote Link to comment https://forums.phpfreaks.com/topic/145187-solved-fresh-eyes-required/#findComment-762070 Share on other sites More sharing options...
andrew_biggart Posted February 14, 2009 Author Share Posted February 14, 2009 The first ones are the names of each bit in the table the cvalues need to go into, and then the second ones are the actual values which i have declared at the top of the code !!! I have named the inputs, the $thingys and the table sections all the same to try and keep it simple grrrrrrrrr Quote Link to comment https://forums.phpfreaks.com/topic/145187-solved-fresh-eyes-required/#findComment-762072 Share on other sites More sharing options...
Solar Posted February 14, 2009 Share Posted February 14, 2009 Either you're calling wrong file (check filename) from your form, you have not uploaded the file to your server after changing it (common reason for strange bugs), or your server does not work properly. Solar: this is correct MySQL syntax. Look it up in manual. Never knew you could write them like that! Cool! Quote Link to comment https://forums.phpfreaks.com/topic/145187-solved-fresh-eyes-required/#findComment-762073 Share on other sites More sharing options...
Mchl Posted February 14, 2009 Share Posted February 14, 2009 It is particularly useful, if you have default values defined for many columns (you just skip those columns in query then), or if you don't want to remember in what order columns in table are defined. Quote Link to comment https://forums.phpfreaks.com/topic/145187-solved-fresh-eyes-required/#findComment-762077 Share on other sites More sharing options...
andrew_biggart Posted February 14, 2009 Author Share Posted February 14, 2009 I have definitly got it uploaded correctly, my login and profiles are working from the same mysql so it isnt that. The config file is 100% the right one. and ive tried writing it like this and it still isnt working.... <?php phpinfo(); include("config_members.php"); $Username = ($_POST['Username']); $Password = ($_POST['Password']); $Email = ($_POST['Email']); $Location = ($_POST['Location']); $Fav = ($_POST['Fav']); $Quote = ($_POST['Quote']); $Interests = ($_POST['Interests']); $Happy = ($_POST['Happy']); $Sad = ($_POST['Sad']); $Habits = ($_POST['Habits']); $Music = ($_POST['Music']); $Movie = ($_POST['Movie']); $Website = ($_POST['Website']); $Aboutme = ($_POST['Aboutme']); $Whywe = ($_POST['Whywe']); $sql = "INSERT INTO User_infoT ( '$Username', '$Password', '$Email', '$Location', '$Fav', '$Quote', '$Interests', '$Happy', '$Sad', '$Habits', '$Music', '$Movie', '$Website', '$Aboutme', '$Whywe'))"; $result=mysql_query($sql) or die(mysql_error().": $sql"); if($result){ echo "<h1 class=contact_us2>Successful, you are now a registered member of www.weloveweed.co.uk, welcome to the family"</h1>; echo "<BR>"; echo "<h1 class=contact_us2>You are now able to login, <a href="default.php">Click hear</a></h1>"; } else { echo "<h1 class=contact_us>ERROR, please try again and insure you have filled in all *required fields, Thank you</h1>"; } // close connection mysql_close(); ?> Is there anything left that i can try? Quote Link to comment https://forums.phpfreaks.com/topic/145187-solved-fresh-eyes-required/#findComment-762084 Share on other sites More sharing options...
andrew_biggart Posted February 14, 2009 Author Share Posted February 14, 2009 ok finally some progress..... it works without the if and else statements, can anyone see why? if($result){ echo "<h1 class=contact_us2>Successful, you are now a registered member of www.weloveweed.co.uk, welcome to the family"</h1>; echo "<BR>"; echo "<h1 class=contact_us2>You are now able to login, <a href="default.php">Click hear</a></h1>"; } else { echo "<h1 class=contact_us>ERROR, please try again and insure you have filled in all *required fields, Thank you</h1>"; } Quote Link to comment https://forums.phpfreaks.com/topic/145187-solved-fresh-eyes-required/#findComment-762087 Share on other sites More sharing options...
Mchl Posted February 14, 2009 Share Posted February 14, 2009 You have to escape quotes in string. echo "<h1 class=contact_us2>You are now able to login, <a href="default.php">Click hear</a></h1>"; should be echo "<h1 class=contact_us2>You are now able to login, <a href=\"default.php\">Click hear</a></h1>"; It's strage however, because it should throw the error with the error_reporting code I gave you first. Quote Link to comment https://forums.phpfreaks.com/topic/145187-solved-fresh-eyes-required/#findComment-762090 Share on other sites More sharing options...
andrew_biggart Posted February 14, 2009 Author Share Posted February 14, 2009 Yea it still being weird but its working without the if and else so il just leave it at that as long as the info is going into the database for now it will do cheers everyone for your help !! Quote Link to comment https://forums.phpfreaks.com/topic/145187-solved-fresh-eyes-required/#findComment-762094 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.