php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5170 variables from java-skript to php4 in a form are not transmitted (only URL)
Submitted: 2000-06-21 15:33 UTC Modified: 2000-07-24 09:04 UTC
From: markus dot bertschmann at systor dot com Assigned:
Status: Closed Package: Other
PHP Version: 4.0 Release Candidate 1 OS: unix
Private report: No CVE-ID: None
 [2000-06-21 15:33 UTC] markus dot bertschmann at systor dot com
/* works in php3 but not in php4...why???   */

<html>
<body>
<SCRIPT language="JavaScript"> 
function checkdata() { 
    var re_email = /^([_a-zA-Z0-9-]+)(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+\.([a-zA-Z]{2,3})$/; 
    var email = document.sendform.email.value; 
    var name = document.sendform.name.value; 
    var checked = true; 
    if (name.length<3) { 
        alert("Hey, your name must contain at least 3 letters!"); 
        checked = false;
    } 
    if ((re_email.test(email))==false || email.length==0) { 
        alert("E-Mail-address false!"); 
        checked = false; 
    } 
    if (checked) {
         		  		 //document.sendform.method = "post"; 
        document.sendform.action = "service.php3"; 
        document.sendform.submit(); 
    } 
    return checked; 
 } 
</SCRIPT> 

<br><br><br>
<? 

if ($sent & $name) { 
    echo " <form method=post action=service.php3> ";
	echo "You sent the following message: <p>"; 
    echo "<b>Your name:</b> $name<br> "; 
    echo "<b>E-Mail:</b> $email<br> "; 
    echo "<b>Evaluation:</b> $rank<br> "; 
    echo "<b>Message:</b><br> "; 
    echo " <div style={background-color:#DDDDDD}> $message </div> "; 
    echo "<b>I know this page from: </b>$purchase";  
    echo "<input type=submit value=\"Sent another message?\">"; 
    echo " </form> "; 
    email("mbertschmann@nexen.net","feedback from homepage", "$name\n,$email\n,$rank\n,$message\n,$purchase");
} else {
     ?>
     
<table cellspacing="0" cellpadding="0" border="0" width="95%"> 	
<tr>
	<td colspan="2"><FONT FACE="Zurich BT">This service is not that special I know. But if you feel dazed and confused for some
	unknown reason, you can come here and get yourself back together again and check the time and the date, even if you are 
	not sure about the remaining days until the weekend, you get everyday an advice how to feel about the days to come:-)
	Maybe you think that someone, who designs homepages like this is totally insane or this pages is just the thing
	you have been looking for a long time...If you feel like telling me what you think about THE SERVICE, you can do
	that right below.</font><td></tr>

<tr><td align="middle" colspan="2"><br><br><FONT FACE="Zurich BT"><h3>How do you like my Homepage?</h3> </font></td></tr>
    <form name="sendform" onsubmit="return checkdata()">
     
        <tr> 
            <td><FONT FACE="Zurich BT">My name:</td> 
            <td><input type="text" name="name" size="50"></font></td> 
        </tr> 
        <tr> 
             <td><FONT FACE="Zurich BT">My E-Mail:</font></td> 
             <td><input type="text" name="email" size="50"></td> 
        <tr> 
            <td><FONT FACE="Zurich BT">Evaluation:</font></td> 
            <td>1<input type="radio" name="rank" value="1"> 
                   2<input type="radio" name="rank" value="2"> 
                   3<input type="radio" name="rank" value="3"> 
                   4<input type="radio" name="rank" value="4" checked>
                   5<input type="radio" name="rank" value="5">
				   6<input type="radio" name="rank" value="6">six is best
				   </td> 
        </tr> 
        <tr> 
            <td valign="top"><FONT FACE="Zurich BT">Message:</font></td> 
            <td><FONT FACE="Zurich BT"><textarea cols="30" rows="6" name="message"> Your message... </textarea></font></td> 
        </tr> 
        <tr> 
            <td><FONT FACE="Zurich BT">I know this page from</font></td> 
            <td><FONT FACE="Zurich BT">
                <select size="1" name="purchase"> 
                <option value="a friend">a friend 
                <option value="the internet">the internet 
                <option value="Markus the master himself">Markus the master himself 
                <option value="holidays, where I met Markus">holidays, where I met Markus 
                <option value="other...">other... </select></font></td> 
        </tr> 
        <tr>
             <td COLSPAN="2">
                <input type="submit" value="Send"> 
                <input type="reset"> 
                <input type="hidden" name="sent" value="1">
            </td> 
        </tr> 
    </table> 
  </form>
<? } ?> 


</body>
</html>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-06-24 10:37 UTC] stas at cvs dot php dot net
How exactly doesn't it work? What is the output? What are your track_variables settings?
 [2000-07-24 09:04 UTC] stas@php.net
no feedback
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 18:02:40 2024 UTC