se7enet purgatorio

Page 1 of 2 12>
Topic Options
Rate This Topic
#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:

<?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.
_________________________
If you want me to punch you in the nuts go to:
http://www.AnmanIndustries.com

I'll do it for free too. Enjoy.

Top
#15961 - 10/31/07 08:27 PM Re: help!! [Re: AnmanIndustries]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
Heh I see multiple mistakes.....
_________________________
MasterFayt - Amara 5 - Manas - Banar

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
#15963 - 11/01/07 06:01 AM Re: help!! [Re: Ziedaan]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
<?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;
$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");
}
?>
_________________________
MasterFayt - Amara 5 - Manas - Banar

Top
#15964 - 11/01/07 06:01 AM Re: help!! [Re: Fayt]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
There it's fully coded for you
_________________________
MasterFayt - Amara 5 - Manas - Banar

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.
_________________________
If you want me to punch you in the nuts go to:
http://www.AnmanIndustries.com

I'll do it for free too. Enjoy.

Top
#15968 - 11/01/07 06:22 PM Re: help!! [Re: AnmanIndustries]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
Take out the $link = opendb();
I know the coding works (may have made a small error, but basicly it works if you fixed the little period bug).
_________________________
MasterFayt - Amara 5 - Manas - Banar

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
#15973 - 11/02/07 09:37 AM Re: help!! [Re: Ziedaan]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
Ah. Try these things. You will need some kind of table like this one.

$page = "<table width='100%' border='1'><tr><td class='title'>Digging</td></tr></table><p>";

Put it above the if ($userrow["currentaction"] coding.

Also change your single quotes to double.

$page .= "You find nothing. Go <a href=\"index.php\">back</a> to explore the map.";

And finally if it doesn't work it's the link your using to access it. Whats the link to it?
_________________________
MasterFayt - Amara 5 - Manas - Banar

Top
#15974 - 11/02/07 09:38 AM Re: help!! [Re: Fayt]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
Oh and also to make it work with no link problems, run it from index.php in all the if, elseif statements near the top, add it in there and include digg.php.
_________________________
MasterFayt - Amara 5 - Manas - Banar

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
 Originally Posted By: Ziedaan
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
#15976 - 11/02/07 08:31 PM Re: help!! [Re: Ziedaan]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
I will try the coding on mine and see what happens.
_________________________
MasterFayt - Amara 5 - Manas - Banar

Top
Page 1 of 2 12>


Hop to:

se7enet

Barack Obama Logo