How do you create a generator?!
5 posts
Page 1 of 1
Last edited by Danny on Sun Feb 19, 2012 10:49 pm, edited 2 times in total.
In one page, you could add a form like this:
Code: Select all
In a file you'll save as 'welcome.php' , add the following code:<form action="welcome.php" method="post">
<input type="text" name="Uname" />
<input type="submit" name="submit" />
</form>
Code: Select all
Hope this helps <!DOCTYPE HTML>
<html lang="en">
<head>
</head>
<body>
<?php
print("Welcome " . $_POST["Uname"];
?>
</body>
</html>
comathi wrote:In one page, you could add a form like this:Doesn't work :C
Code: Select allIn a file you'll save as 'welcome.php' , add the following code:<form action="welcome.php" method="post"> <input type="text" name="Uname" /> <input type="submit" name="submit" /> </form>
Code: Select allHope this helps<!DOCTYPE HTML> <html lang="en"> <head> </head> <body> <?php print("Welcome " . $_POST["Uname"]; ?> </body> </html>
Does it show any errors?
Edit: I got it working. I'll PM you the code.
Edit: I got it working. I'll PM you the code.
for anyone who is wondering why it doesn't work,
Code: Select all
should be print("Welcome " . $_POST["Uname"];
Code: Select all
(missing ")")print("Welcome " . $_POST["Uname"]);
5 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023