javascript - keep getting php white screen of death when i try to add a confirmation box -
i trying make confirmation box when user deletes entry done echo "<a href=\"delete.php?sqluid=".$row[sqluid]."\"><img title='delete row' alt=\"delete\" class='del' src='images/delete.png'/></a></form></div>\n";
statement. tried using "onlick" operator , javascript href redirect delete statement. tried 6 different sets of code found on site dont think implementing correctly. keep getting undefined constant error when check php log
<?php //get database credentials require 'config.php'; // connect mysql database server. mysql_connect ($dbhost, $dbusername, $dbuserpass); //select database mysql_select_db($dbname) or die('cannot select database'); require 'header.php'; $query = "select * ring29 order `ring29`.`ospfarea`,`dot1q`,`subnethost` asc;"; $result = mysql_query($query) or die(mysql_error()); //count number of rows returned $count = mysql_num_rows($result); //table header echo "<div><table id=\"tableheader\" bgcolor=\"#4382b5\">\n"; echo "<tr>\n"; echo "<td> sql uid...........</td>\n"; echo "<td> market:</td>\n"; echo "<td> market code:</td>\n"; echo "<td> ospf area:</td>\n"; echo "<td> primary tag:</td>\n"; echo "<td> 802.1q:</td>\n"; echo "<td> subnet/host:</td>\n"; echo "<td> ipv6 subnet/host:</td>\n"; echo "<td> slot/port:</td>\n"; echo "<td> cmts gw node:</td>\n"; echo "<td> slot/port:</td>\n"; echo "<td> ipv6 subnet/host:</td>\n"; echo "<td> subnet/host:</td>\n"; echo "<td> 802.1q:</td>\n"; echo "<tr>"; echo "</table></div>"; if ($count !== 0) { while($row = mysql_fetch_array($result)) { echo "<div class=\"addform\"><form method='get' action=\"update.php\">\n"; echo " <input type=\"text\" value=\"".$row[sqluid]."\" name=\"sqluid\">\n"; echo " <input type=\"text\" name=\"market\" value=\"".$row[market]."\"/>\n"; echo " <input type=\"text\" name=\"mktcode\" value=\"".$row[mktcode]."\"/>\n"; echo " <input type=\"text\" name=\"ospfarea\" value=\"".$row[ospfarea]."\"/>\n"; echo " <input type=\"text\" name=\"primarytag\" value=\"".$row[primarytag]."\"/>\n"; echo " <input type=\"text\" name=\"dot1q\" value=\"".$row[dot1q]."\"/>\n"; echo " <input type=\"text\" name=\"subnethost\" value=\"".$row[subnethost]."\"/>\n"; echo " <input type=\"text\" name=\"ipv6subnethost\" value=\"".$row[ipv6subnethost]."\"/>\n"; echo " <input type=\"text\" name=\"slotport\" value=\"".$row[slotport]."\"/>\n"; echo " <input type=\"text\" name=\"cmtsgwnode\" value=\"".$row[cmtsgwnode]."\"/>\n"; echo " <input type=\"text\" name=\"slotport1\" value=\"".$row[slotport1]."\"/>\n"; echo " <input type=\"text\" name=\"ipv6subnethost1\" value=\"".$row[ipv6subnethost1]."\"/>\n"; echo " <input type=\"text\" name=\"subnethost1\" value=\"".$row[subnethost1]."\"/>\n"; echo " <input type=\"text\" name=\"dot1q1\" value=\"".$row[dot1q1]."\"/>\n"; echo " <input type=\"image\" src=\"images/update.png\" alt=\"update row\" class=\"update\" title=\"update row\">\n"; echo "<a href=\"delete.php?sqluid=".$row[sqluid]."\"><img title='delete row' alt=\"delete\" class='del' src='images/delete.png'/></a></form></div>\n"; } echo "</table><br />\n"; } else { echo "<b><center>no data</center></b>\n"; } echo "<div>add row:</div>\n"; echo "<div class=\"addform\"><form method='get' action=\"add.php\">\n". " <input type=\"text\" name=\"sqluid\" value=\"enter unique number\"/>\n". " <input type=\"text\" name=\"market\"/>\n". " <input type=\"text\" name=\"mktcode\"/>\n". " <input type=\"text\" name=\"ospfarea\"/>\n". " <input type=\"text\" name=\"primarytag\"/>\n". " <input type=\"text\" name=\"dot1q\"/>\n". " <input type=\"text\" name=\"subnethost\"/>\n". " <input type=\"text\" name=\"ipv6subnethost\"/>\n". " <input type=\"text\" name=\"slotport\"/>\n". " <input type=\"text\" name=\"cmtsgwnode\"/>\n". " <input type=\"text\" name=\"slotport1\"/>\n". " <input type=\"text\" name=\"ipv6subnethost1\"/>\n". " <input type=\"text\" name=\"subnethost1\"/>\n". " <input type=\"text\" name=\"dot1q1\"/>\n". " <input type=\"image\" src=\"images/add.png\" alt=\"add row\" class=\"update\" title=\"add row\">\n". "</form></div>"; ?> <div> <br /> <b>legend:</b> <br /> <img alt="add" src="images/add.png"> add row after entering correct information.<br /> <img alt="update" src="images/update.png"> update row after editing it.<br /> <img alt "delete" src="images/delete.png"> delete row.<br /> <br /> <form method="get" action="http://<ip address removed>"> <button type="submit">back</button> </form> </div> </body> </html>
$row[sqluid] ought $row['sqluid'] , there several more build input elements.
Comments
Post a Comment