Jump to content

[SOLVED] one word called from $_GET


brem13

Recommended Posts

hey, i have a variable that pulls GET data, but when i try to have it show in a text field, it only shows one word, ive had this problem before but cant figure out how to actually fix it, ive tried, but i keep getting errors

the code below will only display 1 word out of 5

echo "value=RE: ".$sub;

Link to comment
https://forums.phpfreaks.com/topic/151633-solved-one-word-called-from-_get/
Share on other sites

<form action="index.php" method="POST">
<font face="Tahoma" size="2">Reply</font><br>
<input type="text" name="sub" width="150px" style="font-size:10px; font-family:Tahoma; height:17px;" <?
$username = $_COOKIE['loggedin'];
$sub = $_GET['sub'];
$user = $_GET['user'];
echo "value=RE: ".$sub;
?>
> Subject<br>
<textarea name="mess" style="font-size:11px; font-family:Tahoma; width: 225px; height: 60px" rows="1" cols="20"></textarea><br />
<input type="submit" name="message" value="Send"><input type="reset" name="reset" value="Clear">
</form>

Always wrap HTML attribute values within quotes.

 

<?php
$username = $_COOKIE['loggedin'];
$sub = $_GET['sub'];
$user = $_GET['user'];
?>

<form action="index.php" method="POST">
<font face="Tahoma" size="2">Reply</font><br>
<input type="text" name="sub" width="150px" style="font-size:10px; font-family:Tahoma; height:17px;" value="RE: <?php echo $sub; ?>"> Subject<br>
<textarea name="mess" style="font-size:11px; font-family:Tahoma; width: 225px; height: 60px" rows="1" cols="20"></textarea><br />
<input type="submit" name="message" value="Send"><input type="reset" name="reset" value="Clear">
</form>

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.