Jump to content

[SOLVED] Fresh eyes required !!!


andrew_biggart

Recommended Posts

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();
?>

Link to comment
Share on other sites

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();
?>

Link to comment
Share on other sites

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

Link to comment
Share on other sites

$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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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! :)

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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>";
   }

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.