-
Posts
2,527 -
Joined
-
Last visited
Everything posted by DeanWhitehouse
-
<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
-
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.
-
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.
-
As in <?php $var = array('first','second'); ?> <script> alert( <?php print_r($var); ?> ); Something similar maybe, as it is untested.
-
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.
-
Please wait at least 12 hours before bumping.
-
[SOLVED] Please help, PHP MYSQL issue.
DeanWhitehouse replied to sturgess1987's topic in PHP Coding Help
if is_null ($array['image']){ ?> should be if (is_null($array['image'])){ ?> -
[SOLVED] Please help, PHP MYSQL issue.
DeanWhitehouse replied to sturgess1987's topic in PHP Coding Help
First,use code tags, and second what does the if statement need to do. -
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
-
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.
-
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.
-
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
-
http://uk3.php.net/str_replace
-
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.
-
can I add many var in on var? like array?
DeanWhitehouse replied to samoi's topic in PHP Coding Help
Exactly , you are just making it more hassle and more confusing for your self. Stay simple until you have a greater knowledge of PHP -
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();
-
Go to the sites i mentioned then?
-
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]; ?>
-
echo shuffle($arr[0]);
-
Another copy and paste basically, i thought you said the HTML isn't a problem, if you don't it then it is. ?
-
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.
-
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
-
[SOLVED] 'Random' result, but giving possiblity?
DeanWhitehouse replied to Michdd's topic in PHP Coding Help
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. ?> -
tizag.com w3schools.com Look at there php tutorials on form processing.