Jump to content

Noob with php <form method="post" action="<?php echo $PHP_SELF;?>">


esutick

Recommended Posts

Ok, I just got an xhtml file of my friend, I'm supposed to put in a website,

But it's not working...

I have no idea about PHP (not a single idea) and my friend isn't picking up his phone and responsing to mail, so I hope any of you guys can help me.

 

1. no .PHP file is included (not sure if it's supposed to)

2. the error I get is : This page contains the following errors:

 

error on line 59 at column 21: Unescaped '<' not allowed in attributes values

Below is a rendering of the page up to the first error.

3 This is my xhtml code":

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Aanmeld pagina</title>
<style type="text/css">
#wrapper {
text-align: left;
width: 980px;
margin-top: 0px;
margin-right: auto;
margin-bottom: 0px;
margin-left: auto;
}
form {
left: 45px;
}
h1 {
position: fixed;
top: 150px;
left: 45px;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
color: #883493;
padding-left: 10px;
}
.p2tag {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
position: fixed;
top: 330px;
color: #7d7d7d;
font-weight: bold;
left: 55px;
border-bottom-style: dotted;
padding-bottom: 10px;
}
input {
left: 20px;
}
label {
left: 45px;
}
.p1tag {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
color: #7d7d7d;
position: fixed;
left: 55px;
top: 300px;
font-style: normal;
padding-top: 100px;
font-weight: normal;
}
</style>
</head>
<body>
<h1>Aanmelden voor nieuwsbrief</h1>
<p><span class="p2tag"> Wilt u op de hoogte blijven van de nieuwste ontwikkelingen van No issue?<br />
Meld u dan aan door dit formulier in te vullen.</span>
<p/><span class="p1tag">
<form method="post" action="<?php echo $PHP_SELF;?>">

<form action="http://www.noissue.nl/aanmelden" method="post" class="ft">
<table>
<colgroup><col align="right"></col><col align="left"></col></colgroup>
<tr><th>Naam:</th>
	<td><input type="text" name="naam" value="" title="naam"><td></tr>
<tr><th>Telefoon nummer:</th>
  <td><input type="text" name="telefoon" title="telefoon"></td></tr>
<tr><th>Email:</th>
	<td><input type="text" name="email" title="email"><td></tr>


<tr><td></td><td><input type="submit" value="Send"></td></tr>
</table>
</form>
</span>
</body>
</html>

 

It's a form to subsribe to a newsletter,

Hope anyone of you can help me on installing this?

 

|Thanks in advance!|

Link to comment
Share on other sites

What is the filename? Is it a .php file, or is the extension something else? Most often php will only be parsed by the webserver if the file extension is .php, or .phtml. In any case, change the <form tag to:

action=""

and try it that way. There's no reason to use that php variable for a form action anyhow.

Link to comment
Share on other sites

Thank you! only now i'm getting a new error

 

This page contains the following errors:

 

error on line 65 at column 46: Opening and ending tag mismatch: td line 0 and tr

Below is a rendering of the page up to the first error.

Link to comment
Share on other sites

I just noticed you have nested 2 <form> tags. That isn't valid markup. But to answer your question contingent on fixing that problem, if it has action="", it will submit to itself, otherwise to whatever URL is specified in the action= attribute.

Link to comment
Share on other sites

Your original problem was this:

<form method="post" action="<?php echo $PHP_SELF;?>">

 

You have an extra greater than symbol (>) in there, after the semi colon.

looks to me like there should be two ">" there.. one closes the PHP and the other closes the form tag..

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.