Help...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
cactus
Forum Regular
Posts: 343
Joined: Tue Jun 10, 2003 4:16 am
Location: UK

Post by cactus »

Fista, post some code, it will help. :)

Regards,
Paddy
Forum Contributor
Posts: 244
Joined: Wed Jun 11, 2003 8:16 pm
Location: Hobart, Tas, Aussie
Contact:

Post 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>
Paddy
Forum Contributor
Posts: 244
Joined: Wed Jun 11, 2003 8:16 pm
Location: Hobart, Tas, Aussie
Contact:

Post 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.
finsta
Forum Newbie
Posts: 10
Joined: Fri Jun 13, 2003 7:22 pm

Post 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>

?>
Post Reply