Jump to content

stuckwithcode

Members
  • Posts

    76
  • Joined

  • Last visited

    Never

Everything posted by stuckwithcode

  1. Is it possible to determine the country the user is in based on their ip address. Thanks, and ideas are welcome
  2. thanks mikesta707 problem solved
  3. So is my session being unset when the url is http://localhost/test.php?test=true and before the page is redirected, I thought the php in the body would not be executed because of the redirect. Thanks
  4. doesn't the php redirect stop the html body being executed the first time round?
  5. my page is called test.php, when i type in the address http://localhost/test.php?test=true why does the code not echo the word hello and then end the session. <?php session_start(); if ($_GET['test']) { $_SESSION['testsession'] = true; header('Location: test.php'); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> </head> <body> <?php if (isset($_SESSION['testsession'])) { echo "Hello"; unset($_SESSION['testsession']); } ?> </body> </html> thanks if not possible other ideas welcome
  6. How can I use js to show the options in a drop down box when i click an image or another event. Thanks
  7. Thanks both for the help, problem solved
  8. Why does this script still echo hello when to me it shouldn't <?php $number = "1"; if ($number != "1" || $number != "2") { echo "hello"; } ?> thanks
  9. Hello, Can anybody tell me what is the largest number that i can enter in a mysql table. Thanks
  10. Yes but if you try these out for yourself you'll see the quality promises more than it delivers
  11. Could you show me an example or a link please, i've spents hours looking with no luck
  12. Hello, How can I round off the corners of my images and still keep them looking smooth.
  13. Thanks for the help, worked like a charm
  14. I am trying to echosome text, so I convert the spaces to &nbsp and its works, apart from the last one is show as &nbsp not as a space $test = "car a"; $test = str_replace(" ", "&nbsp", $test); echo $test; but i get "car &nbspa", how can I get all of the spaces or get php to echo multiple spaces Thanks
  15. I wasn't sure you could do that. With my problem the code does work in a php file on its own but I have a lot of html in my page and when I try to echo this code at the top of the page the line breaks are gone, but not in mozilla etc.
  16. Hello, When I have this php code echo "a"."<br />"."b"."<br />"."<br />"."c"; Opera does not show the line breaks but other browsers do? How do I get the line breaks on Opera. Thanks
  17. If I set a cookie in js can php read this cookie or can you not link them
  18. Hello, I cant seem to get my newly updated php sessions to display there new values until I refresh the page. I use onunload to run a page that deletes the sessions but when I go back to my page the old sessions are there untill I refresh the page. Any help?
  19. Hello, When a user leaves my web page I would like to run some php code, is this possible. Any suggestions are appreciated
  20. Hello, If a user uploads a file and the form doesn't process properly and there is an error is there a way for me to the save the file upload information so the user does not have to re-enter it. can this be done in js or php? Thanks
  21. In one file I have the following php code along with a load of html stuff: <?php echo "<img src='images.php'>"; ?> In the seperate images.php file I have this code, which produces a black square. <?php $W = 100; $H = 100; $Img = imagecreatetruecolor($W, $H); header('Content-type: image/jpeg'); imagejpeg($Img); ?> How can I get the black box to output in the same page as all of my html, instead it displays in its own new page. p.s the images.php file has more to it than that , I just cant get this basic thing to work at the moment. Can anyone help me? Thanks
  22. Hello, when using the code below, my image is displayed on a new page, how can I make the image print out on my current page with the rest of my content. imagejpeg($newImg);
×
×
  • 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.