• Log in or sign up for an account here: https://www.sythe.org/login

Need help this is prob easy!

ddg31

Newcomer
Joined
Nov 23, 2009
Sythe Gold
0
Messages
19
Alright, im trying to figure out how to make a box when u click a generate button. In that box I want to play a url using a post method so like... "http://www.google.com/user= . $POST["user"]";

This is kinda what i want it to look like:


Code:
Gamertag: "Box to type" Generate

~Picture Generates Here~

Direct Link: http://www.google.com/h3.php?u= "What they typed here"


So here is some of my code,

Code:
{source}
[[p]][[center]]Type your gamertag here! If your using Internet Explorer You might have to wait a few seconds for the signature to appear once you click generate.
    [[form action="" method="post"]]
Gamertag: [[input type="text" name="u" /]]
[[input type="submit" value="Generate" /]]
[[/form]]
[[br /]]
[[?php

// If form submitted isn't blank
if (isset($_POST["u"])) {
    $pattern = '/(\A[a-z][a-z0-9 ]+)/i';
    preg_match($pattern, $_POST["u"], $matches);
    if ($_POST["u"] == NULL || $matches[0] != $_POST["u"] || strlen($_POST["u"]) > 15) {
        echo "[[b]]Invalid gamertag[[/b]][[br /]]\n";
    } else {
        echo "<image src=\"/Signatures/Halo3/h3.php?u=" . $_POST["u"] . "\" alt=\"\">";

    }
}

?]]
[[/center]][[/p]]

{/source}

So now, I want it so when u click generate the box comes up with a url with the "u" in it... Any 1 know how?
 
change
PHP:
 echo "<image src=\"/Signatures/Halo3/h3.php?u=" . $_POST["u"] . "\" alt=\"\">";
Too
PHP:
 echo "<image src=\"/Signatures/Halo3/h3.php?u=" . $_POST["u"] . "\" alt=\"\">
<br />
<input type='text'>http://www.url.com/Signatures/Halo3/h3.php?u={$_POST['u']}</input>
";
 
Hey, I'm trying to learn how to design too..
But I just need some help...What is this program basically?

Hm? What do you mean? It's not really a program. It's a web programming language (is it a programming language?), called php. I don't know much in it, but I know it is good for making scripts to do stuff (contact forms, ptc scripts, etc).
You can just use notepad and save it as a .php file, but I think people prefer to use a typing thing (IDE, I think) which is easier I think.

I don't know much either, but I hope that helped you.
 
Runescape Gamblingrunescape gambling
Back
Top