-
Posts
630 -
Joined
-
Last visited
Never
Everything posted by BillyBoB
-
whats the error
-
i cant find my error in my register.php in notepad :(
BillyBoB replied to BillyBoB's topic in PHP Coding Help
ok though all ur i dont like this section of coding i have found the error since most of this coding wasnt updated for the new databases i hadnt made the script check the emails in the profile srry for the big mess and will someone plz tell me why my karma is bad plz -
i cant find my error in my register.php in notepad :(
BillyBoB replied to BillyBoB's topic in PHP Coding Help
which one of the or die(mysql_error()); did u want me to remove? -
i cant find my error in my register.php in notepad :(
BillyBoB replied to BillyBoB's topic in PHP Coding Help
let me go try all that brb -
i cant find my error in my register.php in notepad :(
BillyBoB replied to BillyBoB's topic in PHP Coding Help
ok here is the problem i posted it already but here it is: The information doesn't go to the database. heres is the codeing: [code] <?php echo(" <center> <form method=\"POST\"> Username: <input type=\"text\" size=\"15\" maxlength=\"25\" name=\"username\" /><br /> Password: <input type=\"password\" size=\"15\" maxlength=\"25\" name=\"pass\" /><br /> Confirm Password: <input type=\"password\" size=\"15\" maxlength=\"25\" name=\"cpass\" /><br /> Email: <input type=\"text\" size=\"15\" maxlength=\"50\" name=\"email\" /><br /> <input name=\"submit\" type=\"submit\" value=\"Register\" /> </form> </center> "); if($_POST['submit']) { $username = $_POST['username']; $password = $_POST['pass']; $cpassword = $_POST['cpass']; $email = $_POST['email']; if($password==$cpassword) { $password = md5($password); $checkname = mysql_query("SELECT username FROM users WHERE username='$username'") or die(mysql_error()); $checkname= mysql_num_rows($checkname) or die(mysql_error()); $checkemail = mysql_query("SELECT email FROM users WHERE email='$email'") or die(mysql_error()); $checkemail = mysql_num_rows($checkemail) or die(mysql_error()); if ($checkemail>0|$checkname>0) { echo "The username or email is already in use"; }else{ $username = htmlspecialchars($username); $password = htmlspecialchars($password); $email = htmlspecialchars($email); $query = mysql_query("INSERT INTO users (username, password) VALUES('$username','$password')") or die(mysql_error()); $getuser = mysql_query("SELECT * FROM users WHERE username = '$username'") or die(mysql_error()); $user = mysql_fetch_array($getuser) or die(mysql_error()); $profile = mysql_query("INSERT INTO profile (id,username,rank,email) VALUES('$user[id]','$user[username]','1','$email')") or die(mysql_error()); echo "You have successfully registered!"; } }else{ echo("Your passwords don't match!"); } } ?> [/code] EDIT: if you want to see the page in action then heres the link: [url=http://dreamshowstudios.net/register.php]http://dreamshowstudios.net/register.php[/url] -
i cant find my error in my register.php in notepad :(
BillyBoB replied to BillyBoB's topic in PHP Coding Help
see thats the prob i dont want to send it to anything and i know html but i dont send the form to a page in html either srry -
i cant find my error in my register.php in notepad :(
BillyBoB replied to BillyBoB's topic in PHP Coding Help
ok if u guys think its such a great idea to put an action in tell the exact code to put in plz EDIT: ok heres the latest code plz help [code] <?php echo(" <center> <form method=\"POST\"> Username: <input type=\"text\" size=\"15\" maxlength=\"25\" name=\"username\" /><br /> Password: <input type=\"password\" size=\"15\" maxlength=\"25\" name=\"pass\" /><br /> Confirm Password: <input type=\"password\" size=\"15\" maxlength=\"25\" name=\"cpass\" /><br /> Email: <input type=\"text\" size=\"15\" maxlength=\"50\" name=\"email\" /><br /> <input name=\"submit\" type=\"submit\" value=\"Register\" /> </form> </center> "); if($_POST['submit']) { $username = $_POST['username']; $password = $_POST['pass']; $cpassword = $_POST['cpass']; $email = $_POST['email']; if($password==$cpassword) { $password = md5($password); $checkname = mysql_query("SELECT username FROM users WHERE username='$username'") or die(mysql_error()); $checkname= mysql_num_rows($checkname) or die(mysql_error()); $checkemail = mysql_query("SELECT email FROM users WHERE email='$email'") or die(mysql_error()); $checkemail = mysql_num_rows($checkemail) or die(mysql_error()); if ($checkemail>0|$checkname>0) { echo "The username or email is already in use"; }else{ $username = htmlspecialchars($username); $password = htmlspecialchars($password); $email = htmlspecialchars($email); $query = mysql_query("INSERT INTO users (username, password) VALUES('$username','$password')") or die(mysql_error()); $getuser = mysql_query("SELECT * FROM users WHERE username = '$username'") or die(mysql_error()); $user = mysql_fetch_array($getuser) or die(mysql_error()); $profile = mysql_query("INSERT INTO profile (id,username,rank,email) VALUES('$user[id]','$user[username]','1','$email')") or die(mysql_error()); echo "You have successfully registered!"; } }else{ echo("Your passwords don't match!"); } } ?> [/code] -
i cant find my error in my register.php in notepad :(
BillyBoB replied to BillyBoB's topic in PHP Coding Help
thank u dude action is a cgi i dont use cgi and i find it funny i have 10 other working pages with out the action field and they work fine -
i cant find my error in my register.php in notepad :(
BillyBoB replied to BillyBoB's topic in PHP Coding Help
[code] <?php echo(" <center> <form method=\"POST\"> Username: <input type=\"text\" size=\"15\" maxlength=\"25\" name=\"username\"><br /> Password: <input type=\"password\" size=\"15\" maxlength=\"25\" name=\"pass\"><br /> Confirm Password: <input type=\"password\" size=\"15\" maxlength=\"25\" name=\"cpass\"><br /> Email: <input type=\"text\" size=\"15\" maxlength=\"50\" name=\"emai1\"><br /> <input name=\"register\" type=\"submit\" value=\"Register\"> </form> </center> "); if($_POST[register]) { $username = $_POST[username]; $password = $_POST[pass]; $cpassword = $_POST[cpass]; $email = $_POST[email]; if($password==$cpassword) { $password = md5($password); $checkname = mysql_query("SELECT username FROM users WHERE username='$username'") or die(mysql_error()); $checkname= mysql_num_rows($checkname) or die(mysql_error()); $checkemail = mysql_query("SELECT email FROM users WHERE email='$email'") or die(mysql_error()); $checkemail = mysql_num_rows($checkemail) or die(mysql_error()); if ($checkemail>0|$checkname>0) { echo "The username or email is already in use"; }else{ $username = htmlspecialchars($username); $password = htmlspecialchars($password); $email = htmlspecialchars($email); $query = mysql_query("INSERT INTO users (username, password) VALUES('$username','$password')") or die(mysql_error()); $getuser = mysql_query("SELECT * FROM users where username = '$username'") or die(mysql_error()); $user = mysql_fetch_array($getuser) or die(mysql_error()); $profile = mysql_query("INSERT INTO profile (id,username,rank,email) VALUES('$user[id]','$user[username]','1','$email')") or die(mysql_error()); echo "You have successfully registered!"; } }else{ echo("Your passwords don't match!"); } } ?> [/code] this is what i have post the fixed version plz EDIT: why do u hate me redarrow? -
i cant find my error in my register.php in notepad :(
BillyBoB replied to BillyBoB's topic in PHP Coding Help
ok i think i got it now first the validations werent right then the submit problem i made this code first off a tutorial then off my old site so thats why i just started really making database driven sites but i all clicks in my head fast' NOTE: "Why is my karma so bad i don't get it i had +1 -1 now i have -2" -
i cant find my error in my register.php in notepad :(
BillyBoB replied to BillyBoB's topic in PHP Coding Help
man ur script is too long and confusing maybe if u would put it in the bbcode for code it would look a lot better and use the tabs better u have to tab everything inside the if then if there is another if then tab all of it too lol -
i cant find my error in my register.php in notepad :(
BillyBoB replied to BillyBoB's topic in PHP Coding Help
lol all of this is inside of a table on my site just didnt want to post all that its long -
i cant find my error in my register.php in notepad :(
BillyBoB replied to BillyBoB's topic in PHP Coding Help
dude it works without the ' ' i have built this page b4 but now its now working i didnt build the exact page tho -
i cant find my error in my register.php in notepad :(
BillyBoB replied to BillyBoB's topic in PHP Coding Help
its just not sending srry for the late replay i was playing cs lol by saying sending sending to the database -
ok heres the code tell me if there is an error :( [code] <?php echo(" <center> <form method=\"POST\"> Username: <input type=\"text\" size=\"15\" maxlength=\"25\" name=\"username\"><br /> Password: <input type=\"password\" size=\"15\" maxlength=\"25\" name=\"pass\"><br /> Confirm Password: <input type=\"password\" size=\"15\" maxlength=\"25\" name=\"cpass\"><br /> Email: <input type=\"text\" size=\"15\" maxlength=\"50\" name=\"emai1\"><br /> <input name=\"register\" type=\"submit\" value=\"Register\"> </form> </center> "); if($_POST[submit]) { $username = $_POST[username]; $password = $_POST[pass]; $cpassword = $_POST[cpass]; $email = $_POST[email]; if($pass==$cpass) { $password = md5($password); $checkname = mysql_query("SELECT username FROM users WHERE username='$username'") or die(mysql_error()); $checkname= mysql_num_rows($checkname) or die(mysql_error()); $checkemail = mysql_query("SELECT email FROM users WHERE email='$email'") or die(mysql_error()); $checkemail = mysql_num_rows($checkemail) or die(mysql_error()); if ($checkemail>0|$checkname>0) { echo "The username or email is already in use"; }else{ $username = htmlspecialchars($username); $password = htmlspecialchars($password); $email = htmlspecialchars($email); $query = mysql_query("INSERT INTO users (username, password) VALUES('$username','$password')") or die(mysql_error()); $getuser = mysql_query("SELECT * FROM users where username = '$username'") or die(mysql_error()); $user = mysql_fetch_array($getuser) or die(mysql_error()); $profile = mysql_query("INSERT INTO profile (id,username,rank,email) VALUES('$user[id]','$user[username]','1','$email')") or die(mysql_error()); echo "You have successfully registered!"; } }else{ echo("Your passwords don't match!"); } } ?> [/code]
-
maybe the . instead of , or im saying it wrong put , instead . if not srry i wasted our time lol
-
I did read the pinned note about headers, but...
BillyBoB replied to TecBrat's topic in PHP Coding Help
im saying how do u make the user login so that u dont have to use the dredful ob_start(); -
I did read the pinned note about headers, but...
BillyBoB replied to TecBrat's topic in PHP Coding Help
um i use cookies for login and thats how to set them up how do u make the user stay loged in -
how does karma work ? because i think i have been really nice and i have already got -1 karma?
-
[code] <?php $pid = $_GET[pid]; if($pid == ''){ echo "No Platform ID Specified."; include('includes/footer.php'); }ELSE{ if($pid == '12'){ $sqlthing = mysql_query('WHERE newsecid IN (12,34,35,36,37,38,40,41,42,43,45,46,48)') or die(mysql_error()); //shouldnt they all be like this //shouldnt they all be like this //shouldnt they all be like this } if($pid == '13'){ $sqlthing = 'WHERE newsecid IN (13,35,36,37,39,40,41,42,43,44,45,46,47)'; } if($pid == '14'){ $sqlthing = 'WHERE newsecid IN (14,34,35,36,37)'; } if($pid == '20'){ $sqlthing = 'WHERE newsecid IN (20,38,39,40,41,44,45,47)'; } if($pid == '32'){ $sqlthing = 'WHERE newsecid IN (32,41,42,44,45,47)'; } if($pid == '16'){ $sqlthing = 'WHERE newsecid IN (16,48)'; }ELSE{ $sqlthing = 'WHERE newsecid = $pid'; } if (!$link = mysql_connect($sqlserver, $sqlusername, $sqlpassword)) { echo 'Could not connect to mysql'; exit; } if (!mysql_select_db($sqldatabase, $link)) { echo 'Could not select database'; exit; } $query="SELECT * FROM nuke_seccont $sqlthing AND fletter = 'A'"; $result = mysql_query($query); while ($row = mysql_fetch_array($result)) { $title = stripslashes($row["title"]); $artid = stripslashes($row["artid"]); $counter = stripslashes($row["counter"]); echo "<tr> <td><b><a href=\"review.php?artid=$artid\" title=\"$counter hits\">$title</a></b></td> </tr>"; $i++; } } ?> [/code]
-
yea it should happen becuase u dont refresh your page in the script im sure once u press back and refresh it will send them to wherever
-
shouldnt it have mysql_query then the WHERE section ?
-
when u do more then one email to send to it has to all be in one qoute mail("1,2,3,4",subject,message,header);
-
i think that is how u do it :) i will look it up if not :)