Hoi,
Ik zit met een paar scripts vast..
Ik heb dit script:
In me index.php
En dit script:
Nou zit ik met het probleem:
Bij de index zoekt hij naar het bestand achter de ?p=home (bijv)
maar als ik er van maag ?p=home?cataid=4, dat geeft hij aan dat hij de pagina niet kan vinden..
is daar een makelijke oplossing voor of?
Wouter
Ik zit met een paar scripts vast..
Ik heb dit script:
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"p"[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"index.php"[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Dit is geen geldige verwijzing naar deze pagina!"[/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR][URL="http://www.php.net/file_exists"]file_exists[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"paginas/"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"p"[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]".php"[/COLOR][COLOR= #007700])) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"De pagina kon niet worden gevonden!"[/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"paginas/"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"p"[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]".php"[/COLOR][COLOR= #007700]);
}
}[/COLOR]
?> In me index.php
En dit script:
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"cataid"[/COLOR][COLOR= #007700]])
{[/COLOR]
[COLOR= #0000BB]$sql[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT id, cataid, titel, maker FROM scripts WHERE cataid = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"cataid"[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" ORDER BY id ASC "[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$scripts[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_object"]mysql_fetch_object[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql[/COLOR][COLOR= #007700])){[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Je zit op de cataid: " . scripts->cataid . "[/COLOR][COLOR= #007700];
}
}[/COLOR]
?> Nou zit ik met het probleem:
Bij de index zoekt hij naar het bestand achter de ?p=home (bijv)
maar als ik er van maag ?p=home?cataid=4, dat geeft hij aan dat hij de pagina niet kan vinden..
is daar een makelijke oplossing voor of?
Wouter
, zal ff testen.
)
