doorsturen php

Gestart doorJurre20 reacties39 weergaven

21 berichten · pagina 1 van 2

Jurre

Lid · Topicstarter

Berichten
1.950
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik heb van alles geprobeert maar het lukt niet.

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_COOKIE[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"***"[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"ja"[/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/print"]print[/URL] [COLOR= #DD0000]"Welkom Beta Tester!"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{
<[/COLOR]script language[COLOR= #007700]=[/COLOR][COLOR= #DD0000]"JavaScript"[/COLOR][COLOR= #007700]>[/COLOR]  window[COLOR= #007700].[/COLOR]location[COLOR= #007700]=[/COLOR][COLOR= #DD0000]"http://google.nl/"[/COLOR][COLOR= #007700];[/COLOR] </script>
}
?>


ik heb de echte cookie naam vervangen door ***.
Hoe zorg ik er voor dat hij dan wordt doorgestuurt naar http://google.nl?
als het niet ja is?

MVG jurre

ik heb al met meta geprobeert, maar het lukt niet
0
Berichten
5.795
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_COOKIE[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"***"[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"ja"[/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/print"]print[/URL] [COLOR= #DD0000]"Welkom Beta Tester!"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/elseif"]elseif[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_COOKIE[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"***"[/COLOR][COLOR= #007700]] !=[/COLOR] [COLOR= #DD0000]"ja"[/COLOR][COLOR= #007700])
{
<[/COLOR]script language[COLOR= #007700]=[/COLOR][COLOR= #DD0000]"JavaScript"[/COLOR][COLOR= #007700]>[/COLOR]  window[COLOR= #007700].[/COLOR]location[COLOR= #007700]=[/COLOR][COLOR= #DD0000]"http://google.nl/"[/COLOR][COLOR= #007700];[/COLOR] </script>
}
?>
0
Berichten
5.957
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
header location? Waarom gebruik je dat niet?

*edit*

Javascript moet je in een echo ; doen btw.
0
Jurre

Lid · Topicstarter

Berichten
1.950
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Omdat ik dan een error krijg, iets met dat de header niet kan worden verandertyummieNu krijg ik dit:

Parse error: syntax error, unexpected < in /usr/home/deb27297/domains/**********/public_html/beta/contolle.php on line 8
0
Berichten
5.795
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_COOKIE[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"***"[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"ja"[/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/print"]print[/URL] [COLOR= #DD0000]"Welkom Beta Tester!"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/elseif"]elseif[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_COOKIE[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"***"[/COLOR][COLOR= #007700]] !=[/COLOR] [COLOR= #DD0000]"ja"[/COLOR][COLOR= #007700])
{[/COLOR]
?>
<script language="JavaScript">  window.location="http://google.nl/"; </script>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR]
?>
0
Jurre

Lid · Topicstarter

Berichten
1.950
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Daiman schreef:
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_COOKIE[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"***"[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"ja"[/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/print"]print[/URL] [COLOR= #DD0000]"Welkom Beta Tester!"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/elseif"]elseif[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_COOKIE[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"***"[/COLOR][COLOR= #007700]] !=[/COLOR] [COLOR= #DD0000]"ja"[/COLOR][COLOR= #007700])
{[/COLOR]
?>
<script language="JavaScript">  window.location="http://google.nl/"; </script>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR]
?>
nu krijg ik geen errorspompom, maar er gebeurt niksyummie
De pagina die de cookies moet aanmaken is allowed.php

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/setcookie"]setcookie[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]"***"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"ja"[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/time"]time[/URL][COLOR= #007700]() +[/COLOR][COLOR= #0000BB]15[/COLOR][COLOR= #007700]);[/COLOR]
?>


maar deze heeft deze error,
Warning: Cannot modify header information - headers already sent by (output started at /usr/home/deb27297/domains/***.nl/public_html/beta/allowed.php:1) in /usr/home/deb27297/domains/***.nl/public_html/beta/allowed.php on line 2
0
Berichten
5.795
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
werkt

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_COOKIE[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"***"[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"ja"[/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/print"]print[/URL] [COLOR= #DD0000]"Welkom Beta Tester!"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/elseif"]elseif[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_COOKIE[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"***"[/COLOR][COLOR= #007700]] !=[/COLOR] [COLOR= #DD0000]"ja"[/COLOR][COLOR= #007700])
{[/COLOR]
?>
<script type="text/javascript">
<!--
window.location = "http://www.google.nl/"
//-->
</script>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR]
?>
0
Berichten
450
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_COOKIE[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"***"[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"ja"[/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/print"]print[/URL] [COLOR= #DD0000]"Welkom Beta Tester!"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/elseif"]elseif[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_COOKIE[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"***"[/COLOR][COLOR= #007700]] !=[/COLOR] [COLOR= #DD0000]"ja"[/COLOR][COLOR= #007700])
{[/COLOR]
?>
<meta http-equiv=refresh content=0; URL=http://google.nl>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR]
?>


Succes ermee wink

EDITED:
Als dat niet werkt..
Heb ik nog eentje hierzo

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_COOKIE[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"***"[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"ja"[/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/print"]print[/URL] [COLOR= #DD0000]"Welkom Beta Tester!"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/elseif"]elseif[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_COOKIE[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"***"[/COLOR][COLOR= #007700]] !=[/COLOR] [COLOR= #DD0000]"ja"[/COLOR][COLOR= #007700])
{[/COLOR]
?>
[COLOR= #0000BB]<?[/COLOR] 
[URL="http://www.php.net/header"]header[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"location: http://www.google.nl"[/COLOR][COLOR= #007700]);[/COLOR] 
?>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR]
?>
0
Berichten
450
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Als het te snel doorlink moet je even content op 5 zetten dan duurt het paar secconden wink EDITED; Dus content=5; zo iets smile
0
Jurre

Lid · Topicstarter

Berichten
1.950
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
ik zal het allemaal effe proberen.
0
Berichten
450
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Als het werkt laat t me dan even horen als het niet werkt ken ik er nog wel een paar.
0
Jurre

Lid · Topicstarter

Berichten
1.950
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
de 1e van daiman werkt, maar ik krijg wel 2 waarschuwingen, maar ik kan niet zien wat, omdat hij meteen wordt doorgestuurt.

de 2 van jouw werken ook. bij jouw krijg ik ook 2 waarschuwingneyummie
0
Berichten
450
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_COOKIE[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"***"[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"ja"[/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/print"]print[/URL] [COLOR= #DD0000]"Welkom Beta Tester!"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
?>
[COLOR= #0000BB]<?[/COLOR] 
[URL="http://www.php.net/header"]header[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"location: http://www.google.nl"[/COLOR][COLOR= #007700]);[/COLOR] 
?>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR]
?>


Probeer dit dan is..
zo niet.. DIT:

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_COOKIE[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"***"[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"ja"[/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/print"]print[/URL] [COLOR= #DD0000]"Welkom Beta Tester!"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
?>
<script type="text/javascript">
<!--
window.location = "http://www.google.nl/"
//-->
</script>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR]
?>
0
Berichten
5.957
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Jurre schreef:
de 1e van daiman werkt, maar ik krijg wel 2 waarschuwingen, maar ik kan niet zien wat, omdat hij meteen wordt doorgestuurt.

de 2 van jouw werken ook. bij jouw krijg ik ook 2 waarschuwingneyummie
Ja, dat zijn noob warning

Je mag geen html sturen voor de header.
0
Jurre

Lid · Topicstarter

Berichten
1.950
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
naja, gewoon php probleem melden uitgezet op me host. dus dan ziet niemand hetyummie
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren