help for beginner
Posted: Mon Mar 21, 2011 11:46 pm
I am trying to display on a php page the data input in a text area .
on each line that the user insert into that text area i want 2 variable (tags) added to the user input.
Let me show you an example...
user input = john
after submit = [player]john[/player]
here is the code that i have done so far...
(my index file):
then my bbcode.php file:
of course later when this will be working, the input will be chosen from online database.
so far the code is not working as the input is not include between the 2 variable tag1 and tag2(it worked with a html form single line)
any sugestion?
thanks in advance
on each line that the user insert into that text area i want 2 variable (tags) added to the user input.
Let me show you an example...
user input = john
after submit = [player]john[/player]
here is the code that i have done so far...
(my index file):
Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
</head>
<body>.
<FORM action="bbcode.php" method="post">
<P>
<TEXTAREA name="name" rows="20" cols="80">
</TEXTAREA>
<INPUT type="submit" value="Send"><INPUT type="reset">
</P>
</FORM>
</body>
</html>
Code: Select all
<?php
$tag1 = "[player]";
$tag2 ="[/player]";
$_post=["name"];
echo $tag1;
echo $_post;
echo $tag2;
?>of course later when this will be working, the input will be chosen from online database.
so far the code is not working as the input is not include between the 2 variable tag1 and tag2(it worked with a html form single line)
any sugestion?
thanks in advance