Jump to content

DeanWhitehouse

Members
  • Posts

    2,527
  • Joined

  • Last visited

Everything posted by DeanWhitehouse

  1. <a href="Javascript:history(-1);">Go Back</a> Is this what you want. Btw the JS i wrote isn't tested, and i think it might be slightly wrong
  2. Exactly that's why it will work, try it, i admit that one might not work. But this one will <?php $var = "test, proving you wrong"; echo "<script>alert('".$var."');</script>"; ?> Unless he is trying to do something to make php interact with the JS after the page has loaded, but he didn't say he did. If you do then look at ajax.
  3. First off it's bad practice to use short tags, and second off you are not showing enough code. From what you have shown it appears that $pricing is undefined until it has been posted, which would then make it empty.
  4. As in <?php $var = array('first','second'); ?> <script> alert( <?php print_r($var); ?> ); Something similar maybe, as it is untested.
  5. Some host's do disable the mail feature to some hosting plans, also you haven't shown us what is in the variables as something there might be causing a problem. Also my host only allows emails to be sent from an email address registered with the server, e.g. user@hotmail.com wont work but user@mysite.com will Some host's require (if not all) that a real from email address is used. Some email clients also block certain emails with incorrect/dodgy headers.
  6. Please wait at least 12 hours before bumping.
  7. if is_null ($array['image']){ ?> should be if (is_null($array['image'])){ ?>
  8. First,use code tags, and second what does the if statement need to do.
  9. I have given them, go and learn how to use mysql databases and how to write php to interact with mysql and get data from forms, then return when you have started. http://www.tizag.com/mysqlTutorial/ http://w3schools.com/php/php_mysql_intro.asp
  10. You will need to know more than <?php echo "hello world"; ?> We will not write it , go and learn what you need then return and we will help.
  11. No one here will write it for you, go to tizag.com w3schools.com and learn about mysql and maybe some php, and then when you make a start come back when you encounter an error.
  12. Now don't get me wrong but i have a suspicion that you didn't code this, and it is likely you don't know how to fix the error even though it has been explained to you. Please look before posting It is clearly stated HEADER Errors , please read before posting. http://www.phpfreaks.com/forums/index.php/board,1.0.html http://www.phpfreaks.com/forums/index.php/topic,37442.0.html
  13. You will need ajax i beleive, or javascript, otherwise meta refresh to reload the page every 30 seconds. You will need to update a time stamp every time you show a number, then check how long its been since the last number was shown and if it's 30 seconds then print the next one.
  14. Exactly , you are just making it more hassle and more confusing for your self. Stay simple until you have a greater knowledge of PHP
  15. In the database you have a row called time (or something similar) then have it contain a timestamp, then in your update sql statement put something like UPDATE table SET time = NOW();
  16. Go to the sites i mentioned then?
  17. echo shuffle($arr[1]); maybe? Sorry i haven't used it before Edit: try <?php $arr = array('1','2'); $arr = shuffle($arr); echo $arr[0]; ?>
  18. Another copy and paste basically, i thought you said the HTML isn't a problem, if you don't it then it is. ?
  19. Set a timestamp in the database from there first access (which i would advise being log in) then check each time if it's been 31 days since they first logged in.
  20. Why capitals? And i believe you want explode(); http://uk2.php.net/explode With it you will need the emails separated by something, e.g. a comma
  21. I think you are stuck on the logic? Example <?php $arr = array( '1', '1', '2' ); echo shuffle($arr[0]);// it has a 2 in 3 chance of printing the number 1 ?> or <?php $num = rand(0,3);//make a random number between 1 & 100 $arr = array( '1', '2', '3' ); echo $arr[$num];// this will show each one with the same chance. ?>
  22. tizag.com w3schools.com Look at there php tutorials on form processing.
×
×
  • 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.