Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 05-31-2010, 01:51 AM check my code
Junior Talker

Posts: 3
Name: i have no name
Trades: 0
I'm getting this error:

Code:
 Parse error:  syntax error, unexpected ':' in /home/xxxxxxxx/public_html/redirect.php  on line <b>3
this is my code:

PHP Code:
<?php

   header
'Location: $_GET["url"] '

?>
what am I doing wrong? Thanks!
a124 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-31-2010, 02:52 AM Re: check my code
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
Two things I see wrong:
1. You forgot to add a semi-colon at the end of the line.
2. If you want variables in a string to be parsed you need to use double quotes

Neither of these things should cause the error you mentioned however.

Try:
PHP Code:
<?php

   header
('Location: ' $_GET['url']); 

?>
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
NullPointer is online now
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Reply     « Reply to check my code
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11459 seconds with 12 queries