• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

:( How do I....?

jynt

New Member
Ok, before everyone laughs at me becuase this is a simple question (I'm assuming that) I don't know much about PHP or MySQL and other scripting stuff even less. I can install a phpbb or IBoard but thats about it.

I have a small online text based game. I need to run the php script turns.php every 20 minutes to add +3 to the turns table in the MySQL db.

At least thats what I think I need to do....
 
I think the reason turns.php isn't working is because of an error in the script.

When I go turns.php, I get this error.

Fatal error: Call to undefined function: htmlbegin() in turns.php on line 6


Help
:confused:
 
thats b/c htmlbegin() is not a function
if you create a function go
PHP:
<?
function htmlbegin(){
//do something here
}
?>

and then you can call it
 
Thanks for the help, I'm going to fiddle with it now.
In turns.php, the actually script that is messed is:

{
HTMLbegin("Error");
print "Access forbidden!<br>\n";
HTMLend();
exit;
}

Edit: I simply removed the script and it seems thats going to work, but I'll have to wait and see..

Every time I load the turns.php, it adds the 3 turns I want it to. The thing I need to do now is have it loaded/run every 20 minutes which I have no clue how to do. Could I use a java script or something for this?
 
Last edited:
Back
Top