Current location: Hot Scripts Forums » General Community » Script Requests » simple redirect form?


simple redirect form?

Reply
  #1 (permalink)  
Old 05-11-08, 05:05 PM
St8ic St8ic is offline
Newbie Coder
 
Join Date: Apr 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Lightbulb simple redirect form?

Sorry for the dumb request guys,

What I need is a simple php form where someone can enter in their name (let's use the name joe for example), and it will direct them to mysite.com/joe

If there is no folder called joe, then it displays an error message. Free cookie to anyone who can help me with this.
Reply With Quote
  #2 (permalink)  
Old 05-15-08, 03:54 AM
kjarli kjarli is offline
Newbie Coder
 
Join Date: May 2008
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
PHP Code:

<?php

function MySpace()
{
    if(
$_SERVER['REQUEST_METHOD'] == 'POST')
    {
        if(!isset(
$_POST['name'))
        {
            return 
false;
        }
        else
        {
            
header('location : http://www.myspace.com/' $_POST['name']);
        }
    }
}

?>
Not sure about the checking (i hate myspace so i dont use it)
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
I cannot find what i messed up. Parse error: syntax error, unexpected T_CONSTANT_ENCA bilicek.com PHP 3 01-31-08 04:54 PM
Problem with FormMail script for simple contact form amang Perl 2 09-21-07 07:59 PM
simple php registration form manuleka Script Requests 1 07-19-07 09:08 PM
Simple order PHP form to Email wearetwo PHP 8 01-06-06 03:33 AM
formmail problem gscraper Perl 12 08-27-04 03:06 AM


All times are GMT -5. The time now is 09:18 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.