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

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.