Jump to content

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>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.