Page 2 of 2

Posted: Fri Jun 13, 2003 9:12 pm
by cactus
Fista, post some code, it will help. :)

Regards,

Posted: Fri Jun 13, 2003 9:13 pm
by Paddy
A simple example

Code: Select all

<?php
	$somevar = $_POST['somevar'];
	$somevar = str_replace(" ", "<b>", $somevar);
?>

<html>
<head>
</head>
<body>
	<?php echo($somevar); ?>
	<form action="temp.php" method="post">
		<input type="text" name="somevar">
		<input type="submit" name="submit" value="Enter">
	</form>
</body>
</html>

Posted: Fri Jun 13, 2003 9:15 pm
by Paddy
Oh yeah, your file needs to be called temp.php for this example to work. Just change the file name in the action quotes of the form tag if you wanna change it.

Posted: Fri Jun 13, 2003 9:26 pm
by finsta

Code: Select all

<form name="post news" method="post" action="post_news_process.php">
  <p>Title : <input type="text" name="title">
  <br>
  Author : <input type="text" name="author" value="<?php echo $var; ?>" DISABLED>
	   <input type="hidden" name="author" value="<?php echo $var; ?>">
    <br>
    News :
    <br>
    <textarea name="news" cols="40" rows="6"></textarea></p>
  <p> 
    <input type='submit' style='font:10pt Verdana, Arial, Helvetica, sans-serif; border:1 solid #FFFFFF; cursor:hand; background:#000000; color: #FFFFFF; ' value="Sign Book!">


  </p>
  </form>
</body>
</html>
this is what I have...when someone pushes the enter key I want it to add <b>

?>