Web Design Forum  
 
Go Back   Web Design Forum > Web Software > Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 09-20-2010, 12:16 AM   #1
New Member
 
Join Date: Mar 2010
Posts: 5
Exclamation PHP Register Form > Code appears on the form

When I type in the code
<?php
echo "<h1> Registration </h1>";

$submit = $_POST['submit'];

// form data
$fullname = $_POST['fullname'];
$username = $_POST['username'];

$password = $_POST['password'];
$repeatpassword = $_POST['repeatpassword'];


if ($submit)
{

echo "$username/$password/$repeatpassword/$fullname";

}

?>

<html>


<style type="text/css">
<!--
@import url("file:///C|/Users/Sheiße/Desktop/LS/black/styles.css");
.style14 {
color: #FFFFFF;
background-image: url(images/woodbutton.jpg);
width: inherit;
font-style: normal;
}
.style22 {
font-family: "Palatino Linotype";
font-weight: bold;
color: #000000;
}
.style24 {width: inherit; font-style: normal; background: url(file:///C|/Users/Shei%C3%9Fe/Documents/CASPECT/woodbutton.jpg);}
-->
</style>
<form action='file:///C|/Users/Sheiße/Desktop/LS/black/register.php method='POST'>
<table width="375" height="147" background="images/x (2).jpg" bgcolor="#2B3928">
<tr>
<td background="images/lol.jpg" bgcolor="#FFFFFF"><div align="center"><span class="style22">
Your Full Name </span></div></td>
<td>
<div align="center">
<input type='text' name='fullname'>
</div></td>
</tr>
<tr>
<td background="images/lol.jpg" bgcolor="#FFFFFF"><div align="center"><span class="style22">
Choose a Username </span></div></td>
<td>
<div align="center">
<input type='text' name='username'>
</div></td>
</tr>
<tr>
<td background="images/lol.jpg" bgcolor="#FFFFFF"><div align="center"><span class="style22">
<span class="style22">Choose</span> a Password </span></div></td>
<td>
<div align="center">
<input type='password' name='password'>
</div></td>
</tr>
<tr>
<td background="images/lol.jpg" bgcolor="#FFFFFF"><div align="center"><span class="style22">
Confirm Password
</span></div></td>
<td background="dark-wood-texture.jpg">
<div align="center">
<input type='password' name='repeatpassword'>
</div></td>
</tr>
</table>
<div align="left"></div>
<p align="left">
<input name='submit' type='submit' class="style14" value='Register'>

</form>

</html>

All this has happened, it shows the coding at the top of my form when I try to preview in Firefox ... I have this code on the top script and before <html> Tagg

why does it do this
?

simonz32 is offline   Reply With Quote


Old 10-11-2010, 11:23 AM   #2
New Member
 
Join Date: Sep 2010
Posts: 7
Default

uhm seems like you are just opening in firefox without using the webserver.
Did you installed apache + php?

anyway this form:
<form action='file:///C|/Users/Sheiße/Desktop/LS/black/register.php method='POST'>

can't work because action file should refer to a file in the server (setup by apache), this is like you are pointing to a file in the system, also is missing a ' at the end
<form action="somefile.php" method="post" name="form">
...
__________________
Start a logo design contest at Logo Arena! Get your logo designed by top logo designers
logoarena is offline   Reply With Quote
Reply

Tags
code, form, php, register, script

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 07:57 PM.


Camera Forum - Computer Forum - Web Design Forum

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.