Recent content by SomeoneWhoNeedsAnswers

  1. S

    is this weird..? [i think so]?

    Solution: Make him watch the Opera.
  2. S

    Who thinks Twitter defines America and they way businesses operate?

    Seriously, 1 sentence updates on your life? Whoever finds that amuzing or useful have betrayed our next generation of hard workers. Businesses and consumers are becoming a lazy infestation that is affecting the potential of good businesses. And since "we" want to become lazier, businesses will...
  3. S

    How do I replace special chars in PHP?

    So I'm running into a bit of trouble here trying to replace special characters. The " " quotes seem to be messing it up on some of them. $r= str_replace(""", "X", $r); $r= str_replace("#", "X", $r); $r= str_replace("&", "X", $r); Theres a few that don't work any ideas on how to fix it?
  4. S

    How do I connect to MySQL with PHP remotely?

    Here's my situation. I got one site up that has a mysql database, works fine... Now I purchased a new domain name and am trying to use the same database for the new site. Any idea's on what the host would be? For my other site I use $host = "localhost"; But that doesn't seem to work any ideas...
  5. S

    How do I connect to MySQL with PHP remotely?

    Here's my situation. I got one site up that has a mysql database, works fine... Now I purchased a new domain name and am trying to use the same database for the new site. Any idea's on what the host would be? For my other site I use $host = "localhost"; But that doesn't seem to work any ideas...
  6. S

    Printing blank space from MySQL through PHP?

    I'm trying to print blank space from mysql by using php. So basically in short I got a text area where a user submits text, when they do a cartridge return it shows exactly as it was typed in from the form to MySQL but when I print it with PHP the cartridge returns disappear and it fuses the...
  7. S

    How do I use a PHP If... statement inside of a while... statement? Please try to help!?

    Theres a few ways you could do that. One way is mentioned above so I will mention another option. You could limit it from the query itself for example: $query="SELECT * FROM content WHERE section=1 AND category=1"; If you wanted to take it further and show most recent articles first you could...
  8. S

    Help renaming PHP upload file name?

    Can someone show me a good way to replace the name of a file a user uploads to a new name. User Uploaded File Name: test.jpg Rename to: 356721.jpg Basically all I'm needing help with is replacing everything before the ' . ' but not sure how to go about that. Please show me something simple I'm...
  9. S

    How do you check the size of a image from a PHP upload form?

    By size I don't mean in bytes I mean width and height. So basically I want to restrict the user upload size of an avatar to like 50x50pixels, any idea how?
  10. S

    How do you turn a php/mysql value into a cookie?

    Say I have a query that selects userID from a mysql database and turn it into a cookie, how do I go about that? $userID = $row['userID']; //Here is the variable I want turned into cookie, note that the query is not included here but it works as I have other cookies working with it. setcookie...
  11. S

    PHP/MySQL Select Statement Trouble Selecting Numbers!?

    Having trouble getting this query to work right. So here is some details. $username = mysql_real_escape_string($_COOKIE['username']); $userID = $row['userID']; $commentUserID = $row['commentUserID']; $query = "SELECT userID FROM users WHERE username='$username'; // This statement works...
  12. S

    How do you swap a string to a new string in PHP?

    I'm trying to make a form where a user enters letters & numbers to generate a new letter and number combo. So for instance the form would look like this and the user enters info: Enter a string: _ _ _ _ $number['4'] = 'T'; $number['3'] = 'E'; $number['2'] = 'S'; So basically when a user...
  13. S

    PHP / MySQL cartraige return without using <br/> or /n or /r?

    I'm making a form for comments and such... how do I make it so when the user enters info and creates a cartraige return without having to write <br/><br/> to make space? Cause currently when I press return twice and enter more text and submit it thinks it's one big block of text. Any ideas on...
  14. S

    How do you select a all numbers in a LIKE PHP/MySQL Query?

    This is a bit difficult but trying to figure out how to pull results based on numbers 0 - 9 by first numbers. LIKE '1%' That one works but I need to pull 0 - 9 not just 1 so how would I do that? I tried LIKE '#%' but that doesn't work. Any ideas? Or do I need to do something like LIKE '0%'...
  15. S

    PHP/MySQL SELECT query help needed!?

    Having a hard time selecting results by first letter / number. Any ideas why this doesn't work? $query = "SELECT GAME_ID, gameTitle, gameSystem, gameMainPic, SUBSTRING(gameDescription,1,90) FROM games WHERE gameSystem='Nintendo 64' gameTitle LIKE '#%' ORDER BY gameTitle ASC";
Back
Top