How do you create a generator?!

5 posts Page 1 of 1
Contributors
User avatar
Danny
VIP - Donator
VIP - Donator
Posts: 621
Joined: Sat Oct 30, 2010 8:21 pm

How do you create a generator?!
Danny
Last edited by Danny on Sun Feb 19, 2012 10:49 pm, edited 2 times in total.
User avatar
comathi
Coding God
Coding God
Posts: 1242
Joined: Fri Mar 26, 2010 1:59 pm

Re: How do you create a generator?!
comathi
In one page, you could add a form like this:
Code: Select all
<form action="welcome.php" method="post">
<input type="text" name="Uname" />
<input type="submit" name="submit" />
</form>
In a file you'll save as 'welcome.php' , add the following code:
Code: Select all
<!DOCTYPE HTML>
<html lang="en">
<head>
</head>
<body>

<?php
print("Welcome " . $_POST["Uname"];

?>
</body>
</html>
Hope this helps :D
User avatar
Danny
VIP - Donator
VIP - Donator
Posts: 621
Joined: Sat Oct 30, 2010 8:21 pm

Re: How do you create a generator?!
Danny
comathi wrote:
In one page, you could add a form like this:
Code: Select all
<form action="welcome.php" method="post">
<input type="text" name="Uname" />
<input type="submit" name="submit" />
</form>
In a file you'll save as 'welcome.php' , add the following code:
Code: Select all
<!DOCTYPE HTML>
<html lang="en">
<head>
</head>
<body>

<?php
print("Welcome " . $_POST["Uname"];

?>
</body>
</html>
Hope this helps :D
Doesn't work :C
User avatar
comathi
Coding God
Coding God
Posts: 1242
Joined: Fri Mar 26, 2010 1:59 pm

Re: How do you create a generator?!
comathi
Does it show any errors?

Edit: I got it working. I'll PM you the code. :D
User avatar
rocky4126
VIP - Donator
VIP - Donator
Posts: 258
Joined: Mon Nov 16, 2009 7:39 pm

for anyone who is wondering why it doesn't work,
Code: Select all
print("Welcome " . $_POST["Uname"];
should be
Code: Select all
print("Welcome " . $_POST["Uname"]);
(missing ")")
Image
5 posts Page 1 of 1
Return to “Help & Support”