Jump to content

stuckwithcode

Members
  • Posts

    76
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

stuckwithcode's Achievements

Member

Member (2/5)

0

Reputation

  1. I understand that method but was wondering if you can do it in the one line
  2. no text is just some text that i want to be added to the end of the varaible
  3. why does this not work $name = "john"; mysql_query("UPDATE table SET user = '$name'text WHERE id = '5'"); how can i get the query to insert the variable and the text eg johntext into the table
  4. Is there anyway to work out the age of a session, i.e the time that has elapsed since it was created? Cheers
  5. hello that works well thank you, could you explain it a bit though what does the arrow mean. cheers
  6. Hello, I have many session variables and instead of unsetting them all I want to know if there is some code to remove all current sessions apart from a couple of them. Cheers
  7. I have a script that uploads pictures to a folder. I used mkdir to create this folder and sub folders. Do I need to chmod folders and files, do i need to do this to my other html, php and image files. I am completetly confused who is the owners group etc thanks
  8. when I insert my value i insert $empty = "" and insert that
  9. Hello, I have a mysql table and when I populate it through php i have to insert blank values into fields if not it will not work. How can I put the default value in phpmyadmin to be blank, but not null. I dont understand the null checkbox or the default value option. Please help not phpmyadmin guides found
  10. is this the best way to check if a server is live? <?php $host = "www.google.com"; $fp = fsockopen($host, 80, $errno, $errstr, 10); if($fp) { echo "yes it is"; fclose($fp); } else { echo "no it is not"; } ?> But if you type in a false server eg www.googddfsdfsd.com it returns an error how can i get it to return false and why doesn't it.
  11. I still don't get it, if you look at the code below why does the cookie take a refresh but the variable doesn't then. Could you explain in detail please. <?php session_start(); setcookie("random",1,time()+600000,"/"); echo $_COOKIE['random']; $variable = 1; echo $variable; ?> Thanks
  12. why does the code below not work first time, the value 1 is only echoed after a refresh <?php session_start(); setcookie("random",1,time()+600000,"/"); echo $_COOKIE['random']; ?>
  13. Hello, I understand the code below apart from the \n after the <br />. The br is the line break so what is the \n also doing there. Could someone please explain. wordwrap($text,75,"<br />\n",TRUE); Thanks
×
×
  • 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.