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
header location function @ problem
Old 01-03-2011, 08:05 PM header location function @ problem
Skilled Talker

Posts: 77
Name: adam
Location: UK
Trades: 0
Hi I am trying to add a @ symbol to a url using the header(Location: ) function but I am having no luck.

I tried $url = urlencode("$url"); just before the header function is called but it just displays the %20 symbol.

Would really be useful. I am creating a website for a iPhone display and having this @ symbol is crucial for something I am trying to achieve.
__________________

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
mintuz is offline
Reply With Quote
View Public Profile Visit mintuz's homepage!
 
 
Register now for full access!
Old 01-03-2011, 08:26 PM Re: header location function @ problem
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
Can you post your code, including the value of $url?

Encoding @ should give you %40.
__________________

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!
 
Old 01-04-2011, 05:00 AM Re: header location function @ problem
Skilled Talker

Posts: 77
Name: adam
Location: UK
Trades: 0
PHP Code:
include('includes/connect.php'); 

$id mysql_real_escape_string($id);

echo 
$id;

if (empty(
$id))
{
        
header ('Location: directory_listings.php');
        
$id "";
}

$sql2="SELECT * FROM `numbers` WHERE `id` = '".$id."'";
            
$result2=mysql_query($sql2);
            if (!
$result2) die('Invalid query: ' mysql_error());
                while (
$row2 mysql_fetch_array($result2MYSQL_ASSOC))
                    {    
                        
$number $row2["number"];
                    }
$number urlencode("$number");
header ("Location: facetime://$number");
?> 
However the problem exists because $number can be a number or an email address. and if it is an email address only the @wotever.com is shown. not the bit beforehand which I find odd because I would of thought it would drop that bit. anyways any help will be greatly appreciated.
__________________

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
mintuz is offline
Reply With Quote
View Public Profile Visit mintuz's homepage!
 
Old 01-04-2011, 03:29 PM Re: header location function @ problem
Super Spam Talker

Posts: 879
Name: Paul W
Trades: 0
urlencode("$url"); Should be no quotes around the variable
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE


*** New:
Please login or register to view this content. Registration is FREE
PaulW is offline
Reply With Quote
View Public Profile
 
Old 01-04-2011, 06:06 PM Re: header location function @ problem
Skilled Talker

Posts: 77
Name: adam
Location: UK
Trades: 0
still shows %40 in the link I really need to redirect it using either a pure number or email address. I am doing it to making it so users cant just pull the emails from my users. they have to interact with it. its hard to explain but go to http://www.facetimedirectory.net and sign in with guest as username and guest as password and then go to the directory and you will see what I mean.
__________________

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
mintuz is offline
Reply With Quote
View Public Profile Visit mintuz's homepage!
 
Reply     « Reply to header location function @ problem
 

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.14934 seconds with 12 queries