rogerc Posted May 2, 2008 Share Posted May 2, 2008 hi Having trouble with some javascript.i have four rollover buttons that are not showing and the error that i am getting is saying that my images are not defined ,any body have any ideas thanks rogerc heres the code <? //start a session session_start(); //check if user is coming from a form if ($_POST[op] == "ds") { //check username and password if (($_POST[username] != "admin") || ($_POST[password] != "abc123")) { //handle bad login $msg = "<P><font color=\"#FF0000 \"><strong>Bad Login - Try Again</strong></font></P>"; $show_form = "yes"; } else { //handle good login $_SESSION[valid] = "yes"; $show_menu = "yes"; } } else { //determine what to show if ($_SESSION[valid] == "yes") { $show_menu = "yes"; } else { $show_form = "yes"; } } //build form block $form_block ="<h1>Login</h1> <form method=POST action=\"$_SERVER[php_SELF]\"> $msg <P><strong>username:</strong><br> <input type=\"text\" name=\"username\" size=15 maxlength=25></P> <P><strong>password:</strong><br> <input type=\"password\" name=\"password\" size=15 maxlength=25></P> <input type=\"hidden\" name=\"op\" value=\"ds\"> <P><input type=\"submit\" name=\"submit\" value=\"login\"></P> </FORM>"; //build menu block $menu_block ="<p align=\"center\"><img border=\"0\" src=\"mulroy_logo.gif\" width=\"500\" height=\"50\"></p> <p align=\"left\"><img border=\"0\" src=\"logo.gif\" width=\"100\" height=\"100\" align=\"right\"><img border=\"0\" src=\"logo.gif\" width=\"100\" height=\"100\"></p> <ul> <h3>Select the option that you would like to do Add,Edit,Delete or view a students info</h3> <p align=\"center\"><A HREF=\"do_addstudent.php\" onmouseover=\"document.sub_but.src=navbar_r2_c4\" onmouseout=\"document.sub_but.src=navbar_r2_c4_f2\"> <IMG SRC=\"images/navbar_r2_c4.gif\" WIDTH=\"143\" HEIGHT=\"39\" BORDER=\"0\" ALT=\"Add Student\" NAME=\"sub_but\"> <a align=\"center\"><A HREF=\"pick_modstudent.php\" onmouseover=\"document.sub_but.src=edit_results\" onmouseout=\"document.sub_but.src=edit_results_f2\"> <IMG SRC=\"images/edit_results\" WIDTH=\"143\" HEIGHT=\"39\" BORDER=\"0\" ALT=\"Edit Student\" NAME=\"sub_but\"></a> <a align=\"center\"><A HREF=\"pick_delstudent.php\" onmouseover=\"document.sub_but.src=delete_results\" onmouseout=\"document.sub_but.src=delete_results_f2\"> <IMG SRC=\"images/delete_results.gif\" WIDTH=\"143\" HEIGHT=\"39\" BORDER=\"0\" ALT=\"Delete Student \" NAME=\"sub_but\"></a> <a align=\"center\"><A HREF=\"search.php\" onmouseover=\"document.sub_but.src=view_results\" onmouseout=\"document.sub_but.src=view_results_f2\"> <IMG SRC=\"images/view_results.gif\" WIDTH=\"143\" HEIGHT=\"39\" BORDER=\"0\" ALT=\"View Student\" NAME=\"sub_but\"></a> </ul>"; //assign the block to show to the $display_block variable if ($show_form == "yes") { $display_block = $form_block; } else if ($show_menu == "yes"){ $display_block = $menu_block; } ?> <HTML> <HEAD> <TITLE></TITLE> </HEAD> <BODY> <? echo "$display_block"; ?> </BODY> </HTML> Link to comment https://forums.phpfreaks.com/topic/103865-help-needed/ Share on other sites More sharing options...
conker87 Posted May 2, 2008 Share Posted May 2, 2008 Well, you don't seem to be adding any sort of extension to the image names. Link to comment https://forums.phpfreaks.com/topic/103865-help-needed/#findComment-531658 Share on other sites More sharing options...
rogerc Posted May 2, 2008 Author Share Posted May 2, 2008 hi put the extensions in but still does not come out right thanks Link to comment https://forums.phpfreaks.com/topic/103865-help-needed/#findComment-531665 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.