Jump to content

limitphp

Members
  • Posts

    706
  • Joined

  • Last visited

Everything posted by limitphp

  1. Div would knock the text after it down on the next line, unless I added some style properties to the div. So, perhaps span is the best tag to use to change the font of one word in a section of text?
  2. I thought html 5 has gotten rid of the font tag. I understand it still works in browsers, but is that really the appropriate tag to use? Is there a tag that would be more in line with the new standards?
  3. If I have a section of text in a table or div, or something else, and I just want to change the font color of one word in the text, what is the correct tag to use to change the font color? I understand I should use the style='color:', but what tag is the most appropriate for this?
  4. ok, I just set folder to "Greckle"; so now that piece of code looks like this: <?php $path_set = "/"; $folder = "Greckle"; // set this to be "/folder" if the script is included in a folder define("DOC_ROOT", $_SERVER['DOCUMENT_ROOT'] . $folder); define("SITEURL", "http://" . $_SERVER['HTTP_HOST'] . "/" . $folder); ?> I exited wamp and restarted. And the links still don't have the folder. They still are like this: http://localhost/register.php instead of this: http://localhost/Greckle/register.php ONEDIT: nevermind....I just changed to: $folder = "Greckle/"; the foward slash fixed it. thanks again.
  5. oh my goodness, I'm a fool. I'm sorry....thank you. I haven't been getting alot of sleep lately and my mind is nowhere near 100%. Thanks again.
  6. Ok, my index page loads up, but the images don't work and none of the links work. example) link points to http://localhost/register.php but it should point to http://localhost/Greckle/register.php the folder name is not being included in my links. here is the code I have that should be taking care of that its in a file called inc_set_root.php: <?php $path_set = "/"; $folder = ""; // set this to be "/folder" if the script is included in a folder define("DOC_ROOT", $_SERVER['DOCUMENT_ROOT'] . $folder); define("SITEURL", "http://" . $_SERVER['HTTP_HOST'] . "/" . $folder); ?> in the index file I call this file using this code: <?php session_start(); include("inc_set_root.php"); include("inc_connGreckle.php"); include("inc_global_functions.php"); include("inc_login_script.php"); that is the beginning of my index file. the site is in C:wamp\www\Greckle\
  7. Ok....I solved it. I deleted the testuser and created it again. This time I gave the user all access and localhost and set the testdata database privileges. But, I think the problem was, I had to go back in the user privileges and set to all access to testdata. I guess it had not done that last time, even though I set access to testdata. Anyway, my issue is resolved. thanks all
  8. ok, i'll replace testuser % with testuser localhost. how do you flush privileges?
  9. ok...I did it just for the user testuser and I got this error message: #1141 - There is no such grant defined for user 'testuser' on host 'localhost' here's a screenshot of the users. on testuser, under hosts....there is a %. Does that mean any host including localhost?
  10. ok, I opened up phpmyadmin and put that code in the sql tab. I got this:
  11. on phpmyadmin, on lefthand side I see list of all databases including testdata. I click on users. I clicked add user. for username I put testuser. For password, I put what matches in my code. for "database for user" I left it at none. for global privileges I had it check all. then I clicked the add user button. then i went to "edit privileges" on testuser from the phpmyadmin. under "Add privileges on the following database:" I clicked on testdata. then under Database-specific privileges for the testdata i clicked check all. then i clicked the go button. anyway, for the code to connect I have this: <?php $con = mysql_connect('localhost', 'testuser', 'xxxxxxxxx') or die ('Failed to connect to the database: '.mysql_error()); mysql_select_db ('testdata',$con); ?>
  12. When I load the site on my local machine (using wamp server) I get this error: ( ! ) Warning: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Access denied for user 'testuser'@'localhost' (using password: YES) in C:\wamp\www\Greckle\inc_connGreckle.php on line 2 In the apache error log I get this: PHP Warning: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Access denied for user 'testuser'@'localhost' (using password: YES) in C:\\wamp\\www\\Greckle\\inc_connGreckle.php on line 2, referer: http://localhost/ [Mon Jul 30 19:21:11 2012] [error] [client 127.0.0.1] PHP Stack trace:, referer: http://localhost/ [Mon Jul 30 19:21:11 2012] [error] [client 127.0.0.1] PHP 1. {main}() C:\\wamp\\www\\Greckle\\index.php:0, referer: http://localhost/ [Mon Jul 30 19:21:11 2012] [error] [client 127.0.0.1] PHP 2. include() C:\\wamp\\www\\Greckle\\index.php:4, referer: http://localhost/ [Mon Jul 30 19:21:11 2012] [error] [client 127.0.0.1] PHP 3. mysql_connect() C:\\wamp\\www\\Greckle\\inc_connGreckle.php:2, referer: http://localhost/ I setup the user testuser in phpmyadmin and added testdata database to his privileges and gave him full access. Or at least i think I did. I don't understand why its still saying access denied.
  13. Please, I need help on creating a batch file that will set the clock back five minutes. All the clocks in my computer lab are fast.... I know this is a php forum....but you guys have always come through on helping me with my coding problems.....and I can't find an active dos forum thank you
  14. thank you guys for all the info. So, for production turn off notices and e reporting.....but in the testing phase it best to try and get rid of these notices.... thanks again!
  15. I have this notice: Notice: Undefined index: currentpage in C:\wamp\www\index.php on line 172 Here's the code for that line: // get the current page or set a default $currentpage = is_numeric($_GET['currentpage']) ? (int) $_GET['currentpage'] : 1; I wrote this a while back....i forgot what the question mark and colon do. How can I fix this notice and keep $currentpage set to the right value? thanks
  16. I have this notice: Notice: Undefined variable: logout in C:\wamp\www\inc_login_script.php on line 11 I understand I can turn off these notices, but most of you have suggested I fix them instead. Here's my code for that line: //log user out if ($logout=="yes")//*********** DESTROY SESSION, DELETE COOKIE, DELETE ENTRY { //code here } I guess its giving me this notice because there will be sometimes when logout doesn't have a value. How should I fix this notice? thanks
  17. Thats it!...... I just remembered! I had updated my salt! Thank you.......!!!
  18. Thats a good idea. I'll create a hashPass function. As for the clean function...I'm pretty sure, I haven't changed it....: function clean($value, $type) { if ($type=="sql") { // Stripslashes if (get_magic_quotes_gpc()) { $value = stripslashes($value); } $value = mysql_real_escape_string($value); }elseif ($type=="html") { $value = htmlspecialchars($value, ENT_QUOTES); } return $value; }
  19. I'm curious..... I have some test accounts setup on my website I created....I have never changed their passwords..... I have them stored as hashes in the database.... I use this: $password = strtolower($password); $password = $password.$salt; $password = hash("md5",$password); $queryUser = "SELECT userID,username,fname,lname,verified FROM user WHERE username = '".clean($username,'sql')."' AND password = '".clean($password,'sql')."'"; Is there any way the passwords won't match up after a long period of time? Maybe a change from php 4 to php 5 or something? They didn't stop working until after I had my account at lunarpages reactivated and they had to manually upload a database for me.... They don't seem to be working..... I can change the passwords in them, but I'm, just curious as to how they would stop matching....
  20. nevermind...I figured out how to add users to a database and give them all access.
  21. I remember when i first setup my site on lunarpages, I had to deal with this error, where I was using the wrong password, or I wasn't using a password, I forgot. I got it working months ago...but then my account was reset because I delayed reactivating my account and thats when all the same errors popped back. Here's the error: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'greckle0_greckle'@'localhost' (using password: YES) in /home/greckle0/public_html/inc_connGreckle.php on line 2 Failed to connect to the database: Access denied for user 'greckle0_greckle'@'localhost' (using password: YES) Here's my include connection code: <?php $con = mysql_connect('localhost', 'username', 'password') or die ('Failed to connect to the database: '.mysql_error()); mysql_select_db ('greckle0_lptest',$con); ?> Where I have username and password, I have the real one...I just didn't want to post it. I haven't changed the password. Actually, the only password I have is to login to lunarpages...to the control panel. This may sound like a stupid question, but how do I know if my database is password protected? thanks
  22. SQL query: -- -- Database: `testdata` -- -- -------------------------------------------------------- -- -- Table structure for table `artist` -- CREATE TABLE IF NOT EXISTS `artist` ( `artistID` int( 11 ) NOT NULL AUTO_INCREMENT , `artistName` varchar( 50 ) NOT NULL , `artistNameHash` varchar( 50 ) NOT NULL , `Bio` longtext NOT NULL , PRIMARY KEY ( `artistID` ) ) ENGINE = InnoDB DEFAULT CHARSET = latin1 AUTO_INCREMENT =12; MySQL said: Documentation #1005 - Can't create table 'artist' (errno: 13)
  23. I get this error when i try to import a database using phpmyadmin. I can't believe how incredibly hard it has been trying to import a simple database from wamp server. Please someone help me, lunarpages seems dumbfounded. I just need my site running at this point so I can put it on my resume and get a new job hopefully and get out of teaching.
  24. I'm curious myself. Facebook seems to be able to do massive amounts of database stuff...all without any major slowdown. it seems if i did that much database triggering, it would slow my site down to a crawl.
×
×
  • 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.