#15958 - 10/31/07 02:40 PM
help!!
|
Ziedaan
Malt-o-Meal
Registered: 10/26/07
Posts: 13
Loc: The Netherlands, Veghel
|
Offline
|
|
I have a problem with a script i made. It is a begin it is not ready jet, but it don't wanna work.
<?php
function opendb() // Open database connection.
include('lib.php');
include('cookies.php');
if ($do[0] == "digg") { include('digg.php'); digg(); }
function digg() {{
global $userrow, $controlrow; }
(currentaction == "digg");
if ($userrow["currentaction"] != "digg") { header("Location: digg.php"); die(); }
$treasure = rand(1,1);
if ($treasure == 1) {
$action = "currentaction='digg',";
$page = "hallo";
} else {
donothing();
}}
function donothing() {
$page = "You find nothing. Go <a href=\"index.php\">back</a> to explore the map.";
display($page, "Digg");
}
?>
greetz, Ziedaan
|
|
Top
|
|
|
#15960 - 10/31/07 06:38 PM
Re: help!!
[Re: Ziedaan]
|
AnmanIndustries
Cookie Crisp
   
Registered: 03/21/05
Posts: 2876
Loc: Planet Stupid, AKA Earth
|
Offline
|
|
What happens? Telling us it doesnt work really doesnt help.
|
|
Top
|
|
|
#15962 - 11/01/07 03:34 AM
Re: help!!
[Re: Fayt]
|
Ziedaan
Malt-o-Meal
Registered: 10/26/07
Posts: 13
Loc: The Netherlands, Veghel
|
Offline
|
|
i get a white screen
|
|
Top
|
|
|
#15965 - 11/01/07 09:58 AM
Re: help!!
[Re: Fayt]
|
Ziedaan
Malt-o-Meal
Registered: 10/26/07
Posts: 13
Loc: The Netherlands, Veghel
|
Offline
|
|
it don't work, he give a error (Parse error: parse error, unexpected '.' in /usr/local/psa/home/vhosts/van-den-berg.net/subdomains/daan/httpdocs/digg.php on line 14)
i have tryed to solved the problem but not succesfully
i have change the script a little: <?php include('lib.php'); include('cookies.php'); $link = opendb();
if ($do[0] == "digg") { include('digg.php'); digg(); }
function digg() { global $userrow, $controlrow; $updatequery = doquery("UPDATE {{table}} SET location='Digging', currentaction='digg' WHERE id='".$userrow["id"]."' LIMIT 1", "users"); if ($userrow["currentaction"] != "digg") { header("Location: index.php"); die(); } $treasure = rand(1,2); if ($treasure == 1) { $page =. "You have digged"; } else { $page =. "You find nothing. Go <a href=\"index.php\">back</a> to explore the map."; }
display($page, "Digg"); } ?>
|
|
Top
|
|
|
#15966 - 11/01/07 11:06 AM
Re: help!!
[Re: Ziedaan]
|
Ziedaan
Malt-o-Meal
Registered: 10/26/07
Posts: 13
Loc: The Netherlands, Veghel
|
Offline
|
|
solved, but a other problem showed up: Fatal error: Cannot redeclare stripslashes_deep() (previously declared in /usr/local/psa/home/vhosts/van-den-berg.net/subdomains/daan/httpdocs/lib.php:24) in /usr/local/psa/home/vhosts/van-den-berg.net/subdomains/daan/httpdocs/lib.php on line 31
Edited by Ziedaan (11/01/07 11:08 AM)
|
|
Top
|
|
|
#15967 - 11/01/07 06:05 PM
Re: help!!
[Re: Ziedaan]
|
AnmanIndustries
Cookie Crisp
   
Registered: 03/21/05
Posts: 2876
Loc: Planet Stupid, AKA Earth
|
Offline
|
|
Yeah I knew this would happen. And I saw the multiple errors in the original scrip too. But didnt bother.
Whats in your DIGG.php file.
|
|
Top
|
|
|
#15972 - 11/02/07 08:41 AM
Re: help!!
[Re: Fayt]
|
Ziedaan
Malt-o-Meal
Registered: 10/26/07
Posts: 13
Loc: The Netherlands, Veghel
|
Offline
|
|
take out $link = opendb(); didn't work
digg.php: <?php include('lib.php'); include('cookies.php');
if ($do[0] == "digg") { include('digg.php'); digg(); }
function digg() { global $userrow, $controlrow; $updatequery = doquery("UPDATE {{table}} SET location='Digging', currentaction='digg' WHERE id='".$userrow["id"]."' LIMIT 1", "users"); if ($userrow["currentaction"] != "digg") { header("Location: index.php"); die(); } $treasure = rand(1,2); if ($treasure == 1) { $page .= 'You have digged'; } else { $page .= 'You find nothing. Go <a href=\"index.php\">back</a> to explore the map.'; }
display($page, "Digg"); } ?>
|
|
Top
|
|
|
#15975 - 11/02/07 01:34 PM
Re: help!!
[Re: Ziedaan]
|
Ziedaan
Malt-o-Meal
Registered: 10/26/07
Posts: 13
Loc: The Netherlands, Veghel
|
Offline
|
|
i have change it all, but he give this error again
solved, but a other problem showed up: Fatal error: Cannot redeclare stripslashes_deep() (previously declared in /usr/local/psa/home/vhosts/van-den-berg.net/subdomains/daan/httpdocs/lib.php:24) in /usr/local/psa/home/vhosts/van-den-berg.net/subdomains/daan/httpdocs/lib.php on line 31
|
|
Top
|
|
|
|
|