Jump to content

gec100

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

About gec100

  • Birthday 02/06/1972

Profile Information

  • Gender
    Male
  • Location
    Zagreb, Croatia

gec100's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. thx guys for your answers. most of it is still SciFi for me but i'll get on it tonight and post what i've learned and if i manage to fix the problem. gec
  2. i've checked it and fixed all errors. problem is it checks only the first half of the document. second half is generated after action in the first half.
  3. thx cyberRobot i know for the first <select>. found it earlier and fixed that but the problem is still here. going through validator did not do much help.
  4. hi all i'm relatively unexperienced in using html, php mysql or java so excuse me if i ask stupid questions i can read most of the code fine but when writing syntax could be the problem. i'd like to create drop down menus based on selection of the menu before. here is peace of code i've found on the web. works fine on firefox but not in IE or chrome. here is the test: http://gec.servebeer.com/servis/gec/test.php first drop down is showed and populated from mysql as it should but second drop down is not showing on IE or chrome. here is the code: <?php //seeming that we are just submitting and refreshing to the one page we need to check if the post variable is set, and if so a couple of other variables are set if(!isset($_POST['make'])) { $next_dropdown = 0; } else { //This variable when set reveals the next drop down menu $next_dropdown = 1; //this variable keeps the previous selection selected so you kno wat you are editing $selected = $_POST['make']; } ?> <html> <head> </head> <body <!--I left the action blank to refresh itself--> <form name="form" method="post" action=""> <select name="make" style="background-color: #008000; color:#FFFFFF;"> <option value="NULL">Select Make</option> <?php $con = mysql_connect("localhost", "root", "letmein"); mysql_select_db("car", $con); $query = "SELECT makeID, car_make FROM make ORDER BY makeID ASC"; $result = mysql_query($query); while($row = mysql_fetch_array($result, MYSQL_NUM)) {?> <option value="<?php echo $row[0]; ?>" onClick="document.form.submit()" <?php if(isset($selected) && $row[0] == $selected) {echo "selected='selected'";} ?>><?php echo $row[1]; ?></option>\n"; <?php } echo '</form>\n'; //this is where the other form will appear if the previous form is submitted, ultimately you can keep these fields in the same form you just need to make a way to distinguish the updated form or even perhaps just dynamically change the name of the form and do a switch statement if($next_dropdown == 1) {?> <form name="form2" action="" method="post"> <select name="engine"> <option value="NULL">Select Engine</option> <?php $result2 = mysql_query("SELECT engineID, engine FROM engine ORDERBY engineID ASC"); while($row2 = mysql_fetch_array($result2, MYSQL_NUM)) { ?> <option value="<?php echo $row2[0]; ?>" onClick="document.form2.submit()"><?php echo $row2[1]; ?></option> <?php }?> </select> </form> <?php } ?> </body> </html> any thoughts why this is not working on IE and chrome? thx
  5. hi all again. Name is Dragan. I'm from Croatia, 40y/o, two children and i'm trying to learn php. gave my self a task to build a database of machines i repair and to monitor what has been done per machine. the data should be entered through web browser so it is not os dependable. i'm not very good in html, php, mysql or java script so this is a chalange for me . but planing to learn through the process. that's what i'd like to do. the rest i'll ask in the right sections
×
×
  • 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.