eaglelegend Posted October 17, 2008 Share Posted October 17, 2008 <? ob_start(); mysql_pconnect("localhost","",""); mysql_select_db(""); ?> hey can you guys explain where the username/root and password is meant to go - no instructions with this, sadly Mark, thanks! Link to comment https://forums.phpfreaks.com/topic/128902-crap-coder-need-some-quick-assistance/ Share on other sites More sharing options...
Maq Posted October 17, 2008 Share Posted October 17, 2008 mysql_pconnect Link to comment https://forums.phpfreaks.com/topic/128902-crap-coder-need-some-quick-assistance/#findComment-668275 Share on other sites More sharing options...
eaglelegend Posted October 17, 2008 Author Share Posted October 17, 2008 some more assistance if I may ask... Warning: mysql_pconnect() [function.mysql-pconnect]: Access denied for user 'webredev_USER'@'localhost' (using password: YES) in /home/webredev/public_html/evesecrets/config.php on line 3 Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'webredev'@'localhost' (using password: NO) in /home/webredev/public_html/evesecrets/config.php on line 4 Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in /home/webredev/public_html/evesecrets/config.php on line 4 Warning: mysql_query() [function.mysql-query]: Access denied for user 'webredev'@'localhost' (using password: NO) in /home/webredev/public_html/evesecrets/doregister.php on line 20 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/webredev/public_html/evesecrets/doregister.php on line 20 Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/webredev/public_html/evesecrets/doregister.php on line 20 Warning: mysql_query() [function.mysql-query]: Access denied for user 'webredev'@'localhost' (using password: NO) in /home/webredev/public_html/evesecrets/doregister.php on line 23 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/webredev/public_html/evesecrets/doregister.php on line 23 Cant insert row. Link to comment https://forums.phpfreaks.com/topic/128902-crap-coder-need-some-quick-assistance/#findComment-668291 Share on other sites More sharing options...
eaglelegend Posted October 17, 2008 Author Share Posted October 17, 2008 <?php ob_start(); mysql_pconnect("localhost","USER","PASSWORD"); mysql_select_db("DATABASE"); ?> Link to comment https://forums.phpfreaks.com/topic/128902-crap-coder-need-some-quick-assistance/#findComment-668292 Share on other sites More sharing options...
eaglelegend Posted October 17, 2008 Author Share Posted October 17, 2008 sorry I forgot where the code tab was - now what is this asking? - I am regerstering a sample user. Link to comment https://forums.phpfreaks.com/topic/128902-crap-coder-need-some-quick-assistance/#findComment-668293 Share on other sites More sharing options...
Maq Posted October 17, 2008 Share Posted October 17, 2008 webredev_USER Is this your the correct user name? Remember it's case sensitive so double check your password too. Looks like you're not passing the correct credentials... Link to comment https://forums.phpfreaks.com/topic/128902-crap-coder-need-some-quick-assistance/#findComment-668295 Share on other sites More sharing options...
eaglelegend Posted October 17, 2008 Author Share Posted October 17, 2008 yeah that is correct - its just that the coder that coded this is known to be bad - hense the title, so yeah it is annoying... really... Link to comment https://forums.phpfreaks.com/topic/128902-crap-coder-need-some-quick-assistance/#findComment-668297 Share on other sites More sharing options...
Maq Posted October 17, 2008 Share Posted October 17, 2008 Then what is this user name? 'webredev'@'localhost' (using password: NO) It's also not using a password, your other error, you are... Link to comment https://forums.phpfreaks.com/topic/128902-crap-coder-need-some-quick-assistance/#findComment-668301 Share on other sites More sharing options...
eaglelegend Posted October 17, 2008 Author Share Posted October 17, 2008 "check password" thanks, that may of been the reason, now one last error... Warning: Cannot modify header information - headers already sent by (output started at /home/webredev/public_html/evesecrets/doregister.php:11) in /home/webredev/public_html/evesecrets/doregister.php on line 26 Cant set cookie! doregister.php: <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Cache-Control" content="no-cache"/> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" /> <link href="di.css" rel="stylesheet" type="text/css" /> <title>Teen Board</title> </head> <body> <p><img src="l2.gif" alt="Teen Board" width="125" height="60" /></p> <p class="style1">Login</p> <p> <? include("config.php"); $u = $_POST['u']; $p = $_POST['p']; $check = mysql_num_rows(mysql_query("SELECT * FROM `members` WHERE `username`='$u'")); if($check==0) { $insert = mysql_query("INSERT INTO `members` (`username`, `password`) VALUES('$u', '$p')"); if($insert) { if(setcookie("Board",$u,time()+3600)) { print "You have been registered, and we logged you in.<p><a href=\"index.php\">Click here</a> to return.</p>"; } else { print "Cant set cookie!"; } } else { print "Cant insert row."; } } else { print "User already exists!"; } ?> </p> <div id="navigation"> <div class="navItem2">0. <a href="index.php" accesskey="0">Home</a></div> </div> <p> <strong>© TeenBoard.mobi 2007</strong> </p> </body> </html> Link to comment https://forums.phpfreaks.com/topic/128902-crap-coder-need-some-quick-assistance/#findComment-668303 Share on other sites More sharing options...
Maq Posted October 17, 2008 Share Posted October 17, 2008 Please read this, it's a sticky on this kind of error... Header Errors Link to comment https://forums.phpfreaks.com/topic/128902-crap-coder-need-some-quick-assistance/#findComment-668305 Share on other sites More sharing options...
eaglelegend Posted October 17, 2008 Author Share Posted October 17, 2008 sorry, I dont completely understand that - hense I never read it :s Link to comment https://forums.phpfreaks.com/topic/128902-crap-coder-need-some-quick-assistance/#findComment-668315 Share on other sites More sharing options...
Maq Posted October 17, 2008 Share Posted October 17, 2008 sorry, I dont completely understand that - hense I never read it :s Ok... How do you know you don't understand something that you haven't read? Link to comment https://forums.phpfreaks.com/topic/128902-crap-coder-need-some-quick-assistance/#findComment-668317 Share on other sites More sharing options...
eaglelegend Posted October 17, 2008 Author Share Posted October 17, 2008 it dont really show the code as an example. Link to comment https://forums.phpfreaks.com/topic/128902-crap-coder-need-some-quick-assistance/#findComment-668318 Share on other sites More sharing options...
Maq Posted October 17, 2008 Share Posted October 17, 2008 You're outputting something to the browser before sending the header. Please look carefully. Maybe you could just move an include file? Try it. Link to comment https://forums.phpfreaks.com/topic/128902-crap-coder-need-some-quick-assistance/#findComment-668323 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.