ID: 20823 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Apache2 related Operating System: Redhat7.2 PHP Version: 4.3.0RC2 New Comment:
Duplication of #18648? http://bugs.php.net/18648 Previous Comments: ------------------------------------------------------------------------ [2002-12-04 23:02:58] [EMAIL PROTECTED] <?php var_dump($_REQUEST); ?> : array(3) { ["staffId"]=> string(10) "3staffId=3" ["trackerUser"]=> string(5) "staff" ["trackerPasswd"]=> string(5) "staff" } script: staffForm.php : <?php include("header.inc"); ?> <title>staff form</title> </head> <body> <?php if ( !isset($_REQUEST['staffId']) || $_REQUEST['staffId']==0 ) { return; } $staffId = substr($_REQUEST["staffId"], 1); // printf("<p>%s-%s</p>\n", $p_staffId, $_REQUEST["staffId"]); $query = "SELECT * FROM staff WHERE $staffId"; $result =& doQ($query); $row = mysql_fetch_array($result, MYSQL_ASSOC) ; $login = $row["login"]; $name = $row["firstName"] . " " . $row["lastName"]; $title = $row["title"]; //mysql_free_result($result); ?> <table cellpadding="3" cellspacing="0" border="0"> <tr> <td class="section">name</td> <td class="data"><?php echo $name; ?></td> </tr> <tr> <td class="section">title</td> <td class="data"><?php echo $title; ?></td> </tr> <tr> <td class="section">login</td> <td class="data"><?php echo $login; ?></td> </tr> <tr> <td class="section"><a href="modifyDuties.php?staffId=<?php echo $_REQUEST["staffId"]; ?>">duties</a></td> <td class="data"> <form action="modifyDuties.php?staffId=<?php echo $staffId; ?>" method="GET" name="staffForm"> <?php $result =& doQ("SELECT * FROM skill "); $result2 =& doQ("SELECT * FROM staffSkill WHERE $staffId "); $skills = array(); while ($row2 = mysql_fetch_array($result2, MYSQL_ASSOC) ) { $skills[] = $row2["skillId"]; } if ( count($skills) ) { while ($row = mysql_fetch_array($result, MYSQL_ASSOC) ) { if ( array_search( $row["skillId"], $skills) > -1 ) { print $row["skillName"]."<br>"; } } } else { print "No duties specified."; } /* Free resultset */ //mysql_free_result($result); //mysql_free_result($result2); ?> <!-- <a href="modifyDuties.php?staffId=<?php echo $staffId; ?>"><span class="modifyButton">modify</span></a></td> --> </tr> </table> <?php var_dump($_REQUEST); ?> </body> <?php /* Closing connection */ mysql_close($link); ?> </html> ------------------------------------------------------------------------ [2002-12-04 22:46:51] [EMAIL PROTECTED] What does 'var_dump($_REQUEST)' output? And can you please add a short but _complete_ example script here? ------------------------------------------------------------------------ [2002-12-04 22:17:38] [EMAIL PROTECTED] using: PHP Version 4.3.0RC2 './configure' '--with-mysql=/usr' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-zlib=yes' '--enable-calendar' '--enable-ctype' '--enable-sysvsem' '--with-bz2' '--with-openssl' Apache2.0.43 php source reads: <a href="modifyDuties.php?staffId=<?php echo $_REQUEST["staffId"]; ?>">duties</a> resulting page reads: <a href="modifyDuties.php?staffId=3staffId=3">duties</a> Why is '$_REQUEST["<name>"]' equal to '<value><name>=<value>'? ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=20823&edit=1
