Forum Moderators: coopster

Message Too Old, No Replies

PHP Beginner Question - Combining Forms Horde?

Combing Form Objects using PHP Horde

         

Mwaite

2:10 am on Apr 17, 2005 (gmt 0)

10+ Year Member



Hi! Well this is my first post, yipee!

I am trying to do a login script and ive decided to use php. I know basic things like how to echo a $_Postp[]

I want my login to take ease out of the user since they are logging into a Hordelike email using the index page as the frontend without typing in the ip address everytime.

Normal Login would appear like
user: bill@whateverone.com
pass: whatever

so at the front i got
¦ Form Text ¦ Password Form Text ¦ Submit ¦

no problem with that...
now this is the problem:

I want to take ease out of the user because they have to type in @whatever.com everytime and the thing is there is two possible options so ive created a dropdown menu for @whatever1.com and @whatever2.com
so it would end up being
¦ Form Text ¦ Drop Down ¦ Password Form Text ¦ Submit

now this is probably a easy question but how would i make a php script that it would action to that would combine the FormText and DropDown to make it to one Form name then from that .php post it to the hordlike email front to make a automatic login?

I Hope this makes sense i am sorry if this is easy : )
I was thinking of making a variable or function?... but so far my limited knowledge isnt helping.
any redirect to a previous post or some code help would be greatly appreciated!

jd01

8:29 am on Apr 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could probably do something simple like:

Pass three variables:
user, site, password

Then put the two together on the other side:
$usersite = $user."".$site;

Then evaluate $usersite to check for a match.

Seen it done before, simple and easy.

Justin

Mwaite

3:18 pm on Apr 17, 2005 (gmt 0)

10+ Year Member



Yup Works Great! Here is the page where the form is sent. Thanks for anwering even though it was easy!


<?php $usersite = $namea."".$nameb;?>
</head>
<?php echo $_POST["namea"];?><br />
<?php echo $_POST["nameb"];?><br />
<?php echo $_POST["pw"];?><br />
<?php echo $usersite;?><br />

Testing the Ouput of the Form