Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. Put that on a page and link to the page.
  2. Ah, I read too quickly. You need to have session_start() on every page. Plus, they don't go from subdomains. The session on www.site.com is not the same as site.com or admin.site.com.
  3. [code] <?php print '<a href="javascript:popUp(\'http://www.mysite.co.uk/files/profile.php?id='.$id.'\')" class="red_bold_none">Profile[/url]'; //Or print "<a href=\"javascript:popUp('http://www.mysite.co.uk/files/profile.php?id=$id')\" class=\"red_bold_none\">Profile[/url]"; //OR ?><a href="javascript:popUp('http://www.mysite.co.uk/files/profile.php?id=<?=$id?>')" class="red_bold_none">Profile[/url]<? ?> [/code]
  4. I like the Mootools framework. Mootools.net It makes it very easy to make ajax calls, and there are tons of tutorials for it.
  5. The question you posted was pretty unclear. Are you asking how to upload images instead of music files? It's the same, you just check for different mime types. This is a really vague question. If you have a specific error we can help a lot easier.
  6. You don't, that's the point of sessions. You'd have to move the info into cookies. Edit: well maybe not the point, but how they work. Sessions last only for the browser session - session meaning period of use. If you close the browser or kill the session, it's gone.
  7. Not really...that was pretty much it. <? $string = "Hiil Road, Peterborough, , , , "; echo trim($string, ','); ?>
  8. This isn't a PHP issue. If the number of characters is too large, the HTML has to expand. What you could do is check all the messages for strings which are too long without spaces, and cut them up. Most forums just let the page get stretched. It'll probably help if you give more than 300 pixels for the text.
  9. oh that's because you probably have magic_quotes_gpc turned on. Run stripslashes() on the variables before outputting them.
  10. get the highest one and add one? $sql = "SELECT id FROM table ORDER BY id DESC LIMIT 1";
  11. use trim() passing "," as the extra chars. http://us3.php.net/manual/en/function.trim.php
  12. You could use ajax to send the javascript var to your PHP code.
  13. It looks like it's working fine to me, I tested it on your site and it worked. PS: Malicious, not maliciose.
  14. Firstly, @ surpresses errors, so I think having this $result = @mysql_select_db("$dbdatabase", $conn) or die("stuff"); won't work, as no error could trigger the die. You also don't need quotes around a var, so just $dbdatabase. Take out the @ and see if you get an error? Before trying to use $execute you also need to check if it exists, if anything was returned.
  15. do print_r($_POST) to make sure all of your post vars are named the way you think they should be. PS: Instead of while loops, for loops would be more appropriate here. for($i=1; $i<=31; $i++){   echo '<option value="'.$i.'">'.$i.'</option>'; }
  16. That's what it says. Can you post what you're sending it and what it puts out? (haha puts out. No seriously.)
  17. Well if you look it up in the manual it says the default is ENT_COMPACT. If you look here: http://us2.php.net/manual/en/function.htmlentities.php It tells you what each of the options does. Those are the same ones for specialchars. I think htmlentities might be what you want to use instead.
  18. Well for one, you don't need to surround your vars in "". Try $clean_url = htmlspecialchars($raw_url, ENT_QUOTES); I think you need to add the S on the end of ENT_QUOTE in the first one?
  19. Could you post the code if it's not too long? Perhaps there is a loop it's getting stuck in like SharkBait said.
  20. No, but you could include the two pages together, or redirect to one after the other. This kinda indicates poor design. You might need to restructure the code.
  21. I don't think it is under certain circumstances. If you visit the page as http://www.domain.com/page.php?id=1#home I think URI could do it. But if you went to the page http://www.domain.com/page.php?id=1 then click on the a href to #home, you won't be able to tell, because the page has already loaded. Does that make sense?
×
×
  • 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.