chris707 Posted July 19, 2011 Share Posted July 19, 2011 Hi basically i have a website coming up and need a login page, register page and it just dosnt seem to be working. I got the script of 1stop tutorials and am trying to enter the script which i modified through Kompozer. The script goes as follows. Note this is just the script im using i copy and paste the code into the template im using. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <form name="form1" method="post" action="register.php"> <table border="0" cellpadding="4" cellspacing="0" width="100%"> <tbody> <tr> <td align="left" valign="top" width="24%">First Name</td> <td width="76%"><input name="first_name" id="first_name2" value="<? echo $first_name; ?>" type="text"></td> </tr> <tr> <td align="left" valign="top">Last Name</td> <td><input name="last_name" id="last_name" value="<? echo $last_name; ?>" type="text"></td> </tr> <tr> <td align="left" valign="top">Email Address</td> <td><input name="email_address" id="email_address" value="<? echo $email_address; ?>" type="text"></td> </tr> <tr> <td align="left" valign="top">Desired Username</td> <td><input name="username" id="username" value="<? echo $username; ?>" type="text"></td> </tr> <tr> <td align="left" valign="top">Referred By</td> <td><input name="referred_by" id="referred_by" value="<? echo $referred_by; ?>" type="text"></td> </tr> <tr> <td align="left" valign="top">Referral Code</td> <td><input name="referral_code" id="referral_code" value="<? echo $referral_code; ?>" type="text"></td> </tr> <tr> <td align="left" valign="top">PartyPoker Username</td> <td><input name="partypoker _username" id="partypoker _username" value="<? echo $partypoker _username; ?>" type="text"></td> </tr> <tr> <td align="left" valign="top"> </td> <td><input name="Submit" value="Join Now!" type="submit"></td> </tr> </tbody> </table> </form> </body> </html> I then save this as .php and also enter it into kompozer as php code. When i finish it it comes up on my website with the echo parts still in. So oviously trheres something wrong with my script the website server has also told me its my script. So can anyone help me and find the reason why either my script is wrong or im doing something wrong with kompozer. The server isnt reconising its php cide so it must be the script. Please someone help it took me a while to get it how i want and its so frustrating that it wont work when i upload it to my server. Quote Link to comment https://forums.phpfreaks.com/topic/242358-help-with-php-code-for-my-website-please/ Share on other sites More sharing options...
requinix Posted July 19, 2011 Share Posted July 19, 2011 Can you tell me what PHP tags are supposed to look like? Quote Link to comment https://forums.phpfreaks.com/topic/242358-help-with-php-code-for-my-website-please/#findComment-1244777 Share on other sites More sharing options...
chris707 Posted July 19, 2011 Author Share Posted July 19, 2011 Im confused could you explain more i'm really new to php Quote Link to comment https://forums.phpfreaks.com/topic/242358-help-with-php-code-for-my-website-please/#findComment-1244780 Share on other sites More sharing options...
requinix Posted July 19, 2011 Share Posted July 19, 2011 Really new, huh? What have you learned so far? Quote Link to comment https://forums.phpfreaks.com/topic/242358-help-with-php-code-for-my-website-please/#findComment-1244840 Share on other sites More sharing options...
chris707 Posted July 19, 2011 Author Share Posted July 19, 2011 Not alot really. Do you mean what tags i use between the start and finsih of the script? If so im really not sure what i need to put. Can you help me with this code does it look correct? Also could you tell me what i'm doing wrong if you know? I just really need the script to work. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/242358-help-with-php-code-for-my-website-please/#findComment-1244846 Share on other sites More sharing options...
Drummin Posted July 19, 2011 Share Posted July 19, 2011 Have you tried putting your php inside real start and end tags? <?php echo $first_name; ?> Quote Link to comment https://forums.phpfreaks.com/topic/242358-help-with-php-code-for-my-website-please/#findComment-1244882 Share on other sites More sharing options...
chris707 Posted July 20, 2011 Author Share Posted July 20, 2011 Im still stuck. I tryed your idea Drummin but still my server dosnt reconise it as php code so it just shows the php code. My script now looks like this. <form name="form1" method="post" action="register.php"> <table border="0" cellpadding="4" cellspacing="0" width="100%"> <tbody> <tr> <td align="left" valign="top" width="24%">First Name</td> <td width="76%"><input name="first_name" id="first_name2" value="<? php echo $first_name; ?>"></td> </tr> <tr> <td align="left" valign="top">Last Name</td> <td><input name="last_name" id="last_name" value="<? php echo $last_name; ?>" type="text"></td> </tr> <tr> <td align="left" valign="top">Email Address</td> <td><input name="email_address" id="email_address" value="<? php echo $email_address; ?>" type="text"></td> </tr> <tr> <td align="left" valign="top">Desired Username</td> <td><input name="username" id="username" value="<? php echo $username; ?>" type="text"></td> </tr> <tr> <td align="left" valign="top">Referred By</td> <td><input name="referred_by" id="referred_by" value="<? php echo $referred_by; ?>" type="text"></td> </tr> <tr> <td align="left" valign="top">Referral Code</td> <td><input name="referral_code" id="referral_code" value="<? php echo $referral_code; ?>" type="text"></td> </tr> <tr> <td align="left" valign="top">PartyPoker Username</td> <td><input name="partypoker _username" id="partypoker _username" value="<? php echo $partypoker _username; ?>" type="text"></td> </tr> <tr> <td align="left" valign="top"> </td> <td><input name="Submit" value="Join Now!" type="submit"></td> </tr> </tbody> </table> </form> Can anyone help me please im really stuck. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/242358-help-with-php-code-for-my-website-please/#findComment-1245267 Share on other sites More sharing options...
Maq Posted July 20, 2011 Share Posted July 20, 2011 chris, in the future, please place OR tags around your code. Quote Link to comment https://forums.phpfreaks.com/topic/242358-help-with-php-code-for-my-website-please/#findComment-1245270 Share on other sites More sharing options...
spiderwell Posted July 20, 2011 Share Posted July 20, 2011 what file extension is your file also. Quote Link to comment https://forums.phpfreaks.com/topic/242358-help-with-php-code-for-my-website-please/#findComment-1245278 Share on other sites More sharing options...
Drummin Posted July 20, 2011 Share Posted July 20, 2011 I am still seeing <? php echoinstead of<?php echo Quote Link to comment https://forums.phpfreaks.com/topic/242358-help-with-php-code-for-my-website-please/#findComment-1245279 Share on other sites More sharing options...
requinix Posted July 20, 2011 Share Posted July 20, 2011 I am still seeing <? php echoinstead of Because that's exactly what's in your file. You say you tried Drummin's idea - where? I don't see anything different. I'll try spelling it out too: you must use actual s. Not < and not >. Quote Link to comment https://forums.phpfreaks.com/topic/242358-help-with-php-code-for-my-website-please/#findComment-1245287 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.