Nick Very Senior Member
Posts: 3,012 Status: Offline Gender: Male Location: vForums Age: 34 Joined:
pmwww | need some help? (11th Jan 10 at 7:21am UTC) | | I need some help with a few things, firstly I need a submition form like The Web Tower.com has, and second I need a code that has the "waiting for approval" and shows the submitted form for others to see. I'm trying to make an affiliate type of site. like The web tower is, but mine will just be a directory, which is. http://thedirctory.2x.nu
I also need some help with API, but maybe i should post in the API board? | |
|
Michael Moderator
Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
pmvForum | Re: need some help? (11th Jan 10 at 7:28am UTC) | | Yes to posting in the API board for API support. And do you want the form to email you or what? | |
|
Nick Very Senior Member
Posts: 3,012 Status: Offline Gender: Male Location: vForums Age: 34 Joined:
pmwww | Re: need some help? (11th Jan 10 at 7:31am UTC) | | Yeah to email me, and then send them to another page saying that it's going in for approval, and thanks, Also my affiliate banner/code on the same page and what ever else. Then I can add their Affiliate Banner into the Directory. when I get it/approve it.
and ok, also thanks!:) | |
|
Michael Moderator
Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
pmvForum | Re: need some help? (11th Jan 10 at 7:33am UTC) | | Ok, well I'll just make it redirect to a set page for you!
What things do you want them to provide when submitting? | |
|
Nick Very Senior Member
Posts: 3,012 Status: Offline Gender: Male Location: vForums Age: 34 Joined:
pmwww | Re: need some help? (11th Jan 10 at 7:39am UTC) | | Ok and:
User Name: E-Mail: Site URL: Site Banner: Site Category: e.g. Anime, Computing, etc
| |
|
Michael Moderator
Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
pmvForum | Re: need some help? (11th Jan 10 at 7:54am UTC) | | <? if($_SERVER['REQUEST_METHOD'] == 'POST'){ if(!isset($_POST['username']) || $_POST['username'] == '') $error[] = 'Username is required'; if(!isset($_POST['email']) || $_POST['email'] == '') $error[] = 'Email is required'; if(!isset($_POST['site']) || $_POST['site'] == '') $error[] = 'Site URL is required'; if(!isset($_POST['banner']) || $_POST['banner'] == '') $error[] = 'Banner URL is required'; if(!isset($_POST['category']) || $_POST['category'] == '') $error[] = 'Site Category is required'; if(!isset($error)){ mail("Email Address", "New Site Submission", "Username: " . $_POST['username'] . "\nEmail: " . $_POST['email'] . "\nSite: " . $_POST['site'] . "\nBanner: " . $_POST['banner'] . "\nCategory: " . $_POST['category'], "From: " . $_POST['username'] . " <" . $_POST['email'] . ">"); header("location: ./confirm.html"); }else echo "-" . implode("<br />-", $error); } ?> <form action = 'dm_email.php' method = 'post'> Username: <input name = 'username' /><br /> Email Address: <input name = 'email' /><br /> Site URL: <input name = 'site' /><br /> Banner URL: <input name = 'banner' /><br /> Site Category: <input name = 'category' /><br /> <input type = 'submit' value = 'submit' /> </form>
That's the code that you need. Simply modify the coloured bits. Red = Email Address to send them to. Blue = Confirmation page (saying it's been submitted etc...) Green = Name of the file that you save that code as. When I was testing I saved the file as 'dm_email.php' you might save it as 'submit.php'
Questions, post them. | |
|
Nick Very Senior Member
Posts: 3,012 Status: Offline Gender: Male Location: vForums Age: 34 Joined:
pmwww | Re: need some help? (11th Jan 10 at 8:02am UTC) | | Thanks I have uploaded it, Now how do I add the form? | |
|
Michael Moderator
Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
pmvForum | Re: need some help? (11th Jan 10 at 8:03am UTC) | | The form is part of that page! You browse to that page, and the form will appear, and then people can fill it in! | |
|
Nick Very Senior Member
Posts: 3,012 Status: Offline Gender: Male Location: vForums Age: 34 Joined:
pmwww | Re: need some help? (11th Jan 10 at 8:15am UTC) | | Oh I see. Is there anyway it can be displayed on the main home page?
Because I got this: http://thedirectory.2x.nu/submit.php But I want it on the home page. | |
|
Michael Moderator
Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
pmvForum | Re: need some help? (11th Jan 10 at 8:22am UTC) | | Put the code on the home page
Just copy & Paste the code, and remember to change the different parts! | |
|
Nick Very Senior Member
Posts: 3,012 Status: Offline Gender: Male Location: vForums Age: 34 Joined:
pmwww | Re: need some help? (11th Jan 10 at 8:25am UTC) | | Ok, so the whole code? and nothing detaches from it? | |
|
Michael Moderator
Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
pmvForum | Re: need some help? (11th Jan 10 at 8:27am UTC) | | Nope. Just copy & paste it where you want it. | |
|
Nick Very Senior Member
Posts: 3,012 Status: Offline Gender: Male Location: vForums Age: 34 Joined:
pmwww | Re: need some help? (11th Jan 10 at 8:31am UTC) | | Ok I did, and this shows up above it:
"); header("location: ./confirm.html"); }else echo "-" . implode(" -", $error); } ?>
http://thedirectory.2x.nu/ | |
|
Michael Moderator
Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
pmvForum | Re: need some help? (11th Jan 10 at 8:34am UTC) | | That doesn't show up for me.... | |
|
Nick Very Senior Member
Posts: 3,012 Status: Offline Gender: Male Location: vForums Age: 34 Joined:
pmwww | |