Jump to content

[SOLVED] %20 Not working 0_o


Chevy

Recommended Posts

Okay well this script I am running works perfectly so far, but once the script echo's a link then that link stops where there is a %20

[code]$insertt = mysql_query("INSERT INTO `mail`
(`to`, `from`, `date`, `message`, `title`) VALUES('$ho2[username]', '$user_ffo[username]', '$date', '$country would like to be allies with you, $country2<br><br><a href=ally.php?country=$country&country2=$country2>Click here for options!</a>', 'Ally Request!')");[/code]

$country has a space like Cookie Monster

$country2 also has a space


Then when it goes and echo's the link will be

[code]<a href=ally.php?country=Cookie></a>[/code]

When I want it to be

[code]<a href=ally.php?country=Cookie Monster&country2=Cookie Monster2>Click Here!</a>[/code]

Any help?
Link to comment
https://forums.phpfreaks.com/topic/31633-solved-20-not-working-0_o/
Share on other sites

I'm not exactly sure what you are doing here. About the script and the link. Can you explain what the script is about or what it does? So I can more clearly understand your question. Also, can you paste the script in a more eye pleasing way?
[code=php:0]
if ($act == "view"){
$frill = mysql_fetch_array(mysql_query("SELECT * FROM `mail` WHERE `id`='$id'"));
$hjh = stripslashes($frill['message']);
$hjh2 = stripslashes($frill['title']);

if ($frill['to']!=$user_ffo['username']){
error("This is not your mail to view!<br><br>
<a href=\"JavaScript:history.go(-1)\">Go Back</a>");
}

$update = mysql_query("UPDATE `mail` SET `status`='Read' WHERE `id`='$id'");

echo '<table width="500" cellspacing="2" cellpadding="2"><tr>
<td style="border:1px solid black;" bgcolor="#A3A3A3" align="center"><b>Viewing Message</b></td></tr></table>
<table width="500" cellspacing="2" cellpadding="2"><tr>
<td style="border:1px solid black;">To: <b>'.$frill['to'].'</b></td></tr><tr>
<td style="border:1px solid black;">Subject:  <b>'.$hjh2.'</b></td></tr><tr>
<td style="border:1px solid black;">'.$hjh.'<br><br>
<a href="mail.php?act=create&user='.$frill['from'].'">Reply</a></td></tr>
</table>';
include("footer.php");
exit;
}
[/code]
^ Thats where you view the message..

And

[code=php:0]
$insertt = mysql_query("INSERT INTO `mail`
(`to`, `from`, `date`, `message`, `title`)
VALUES ('$ho2[username]', '$user_ffo[username]', '$date', '$country would like to be allies with you, $country2<br><br><a href=ally.php?country=$country&country2=$country2>Click here for options!</a>', 'Ally Request!')");
[/code]

Thats the sending of the message

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.