Mathematicman Posted August 29, 2007 Share Posted August 29, 2007 Hey everybody I'm kinda new to php... so if this question has been asked before, I'm sorry... I was trying to put together a PHP program (is that what you call it?). And I needed it to refresh every 60 seconds or so... So I looked in the "PHP Manual" on php.net... and I found the function "ncurses_refresh" Below is the URL to the page where I found it http://ca.php.net/manual/en/function.ncurses-refresh.php So I tried it... The code looked something like this: <?php $ch= "5"; ncurses_refresh( int $ch ); ?> And it came up with this error: Parse error: syntax error, unexpected T_VARIABLE in /home/joshua77/public_html/PHP_sandbox/test1.php on line 3 So my question is... What do I need to do to fix it? Thanks in advance for your help. Quote Link to comment Share on other sites More sharing options...
madspof Posted August 29, 2007 Share Posted August 29, 2007 i wouoldnt bother with the php redirect plus i have never heard of it. I would use a bit of html to get your page to refresh this is what you need <meta http-equiv="refresh" content="60"> Quote Link to comment Share on other sites More sharing options...
trq Posted August 29, 2007 Share Posted August 29, 2007 ncurses is for use within shells, not a within a server environment. There is no refresh function in php because it runs on the server not the client. For client side interations you need to use Javascript. Quote Link to comment Share on other sites More sharing options...
madspof Posted August 29, 2007 Share Posted August 29, 2007 But the code I provided would work either way Quote Link to comment Share on other sites More sharing options...
Mathematicman Posted August 30, 2007 Author Share Posted August 30, 2007 Ok... Thanks for your help guys I was going to try and do the whole thing without html... but after trying it out I see it works great... So thanks again for your help Quote Link to comment Share on other sites More sharing options...
Jessica Posted August 30, 2007 Share Posted August 30, 2007 Well, to address the actual ERROR: the int in the manual is telling you what type of variable to send. You don't type int in your code. You just send the variable. ncurses_refresh($ch); However, use one of the other methods provided here to do what you want. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.