Forum Moderators: coopster

Message Too Old, No Replies

Cold fusion syntax to PHP

CFset to PHP

         

dragon_my

3:30 pm on Apr 9, 2003 (gmt 0)

10+ Year Member



Hi all, I need help to convert Cold fusion syntax to PHP.
Thanks.
e.g:

<cfset user = form.userid>
<cfset password = form.passwd>
<cfset LoginID = "#USER#@website.com">

<form method="POST" action="http://website.com/login.cgi" name="loginpage" >
<cfoutput> <input type="hidden" name="page" value="login">
<input type="hidden" name="userid" value="#LoginID#" size="30" maxlength="30">
<input type="hidden" name="passwd" value="#password#" size="30" maxlength="30">

</cfoutput>
</form>

jatar_k

4:41 pm on Apr 9, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld dragon_my,

Since I don't do any cf I asked a coworker who does. It would seem that you are setting some vars and then putting their value into form element values. I'm not totally sure where they are coming from though.

Some links that might help you out.
Language Reference [php.net]
echo [php.net]
Predefined Variables [php.net] - look for $_POST which is the superglobal associative array that stores all of the names/values of all posted info.

DZero

12:40 am on Apr 11, 2003 (gmt 0)

10+ Year Member



<?
$user= $_POST["userid"];
$password= $_POST["passwd"];
$LoginID= $user.'@website.com';
?>
<form method="POST" action="test.php" name="loginpage" >
<input type="hidden" name="page" value="login">
<input type="hidden" name="userid2" value="<?= $LoginID;?>" size="30" maxlength="30">
<input type="hidden" name="passwd2" value="<?= $password;?>" size="30" maxlength="30">
</form>

Here ya go!
php.net has a documentation section which is really good. Just search there for what you want (ie "forms") and you should get something useful back =)

dragon_my

4:25 pm on Apr 11, 2003 (gmt 0)

10+ Year Member



Thank you so much DZero and jatar_k.

I'm a new bie to PHP. Gone through a number of books and website to get this done. Thank you once again.

Cheers guys!