june_c21
Members-
Posts
280 -
Joined
-
Last visited
Never
Everything posted by june_c21
-
<form id="form1" name="form1" method="post" action=""> Drop Down <select name="select"> <option value="A">A</option> <option value="B">B</option> <option value="C">C</option> </select> </form> when user click on A, it will go to A database. how to write the php code?
-
hi, i want to make a drop down menu for user to filter data. when user click on it will redirect to generate the filter data from mysql. how to write the code? thanks.
-
thank you
-
i re-checked my code and there is no error... can you brieftly explain the details sorry, i'm new in this
-
hi, i'm stuck in this error code : <?php session_start(); $host = 'localhost'; $user = 'root'; $password = 'admin'; $dbase = 'staff'; $dblink = mysql_connect($host,$user,$password); mysql_select_db($dbase,$dblink); $staff_no = $_POST['staff_no']; $position = $_POST['position']; $date = $_POST['date']; $app_letter = $_POST['app_letter']; $info_form = $_POST['info_form']; $handbook = $_POST['handbook']; $access_card = $_POST['access_card']; $vehicle_sticker = $_POST['vehicle_sticker']; $medical_check_up = $_POST['medical_check_up']; $safety_briefing = $_POST['safety_briefing']; $safety_helmet = $_POST['safety_helmet']; $safety_google = $_POST['safety_google']; $safety_boot = $_POST['safety_boot']; $computer = $_POST['computer']; $tel_ext = $_POST['tel_ext']; $room_no = $_POST['room_no']; $email = $_POST['email']; $stationary = $_POST['stationary']; $uniform = $_POST['uniform']; $tshirt = $_POST['tshirt']; $medical_card = $_POST['medical_card']; $induction_program = $_POST['induction_program']; $query= "INSERT INTO details(staff_no,position,date,app_letter,info_form,handbook,access_card,vehicle_sticker,medical_check_up,safety_briefing,safety_helmet,safety_google,safety_boot,computer,tel_ext,room_no,email,stationary,uniform,tshirt,medical_card,induction_program) VALUES ('$staff_no', '$position','$date','$app_letter','$info_form','$handbook','$access_card','$vehicle_sticker','$medical_check_up','$safety_briefing','$safety_helmet','$safety_google','$safety_boot','$computer','$tel_ext','$room_no','$email','$stationary','$uniform','$tshirt','$medical_card','$induction_program') "; $result = mysql_query($query,$dblink); ?> error : Notice: Undefined index: access_card in C:\Web\staff\add.php on line 17 Notice: Undefined index: medical_check_up in C:\Web\staff\add.php on line 19 Notice: Undefined index: safety_briefing in C:\Web\staff\add.php on line 20 Notice: Undefined index: safety_google in C:\Web\staff\add.php on line 22 Notice: Undefined index: tel_ext in C:\Web\staff\add.php on line 25 Notice: Undefined index: uniform in C:\Web\staff\add.php on line 29 Notice: Undefined index: tshirt in C:\Web\staff\add.php on line 30
-
ok. i think i get what you mean. thanks again
-
hi, i got this error... anyone please help. thanks SQL query: CREATE SEQUENCE language_id_seq MySQL said: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SEQUENCE language_id_seq' at line 1
-
can you explain more clearly?
-
hi, i need help to solve this problem. Please help. thanks SQL query: CREATE TABLE type_of_title( type_of_title INT CHECK ( type_of_title <6 ) PRIMARY KEY , t_o_t_desc TEXT NOT NULL ); MySQL said: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'PRIMARY KEY, t_o_t_desc TEXT NOT NULL )' at line 2
-
huh? i don't understand. can you briefly explain. sorry, i am new with this
-
hi, i just can't figure out what's wrong with my code. anyone please help.... thanks CREATE TABLE {$db_prefix}banned ( type tinytext NOT NULL, value tinytext NOT NULL ) TYPE=MyISAM; #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{$db_prefix}banned ( type tinytext NOT NULL, value tinytext NOT NULL )' at line 1
-
try to put $row[0] instead of $$row[0]
-
Problem with the query: SELECT work_id,unit,title1,fault_rep_id,start_date,end_date,secr_recd,facilitator FROM report WHERE id=f Unknown column 'f' in 'where clause' how come? when i check in database the id is integer
-
what's wrong ?? $id = $_GET['id']; $query = "SELECT work_id,unit,title1,fault_rep_id,start_date,end_date,secr_recd,facilitator FROM report WHERE id=$id "; $result = mysql_query($query, $dblink); while($myrow = mysql_fetch_row($result)) { $work_id = $myrow[0]; $unit= $myrow[1]; $title1 = $myrow[2]; $fault_rep_id = $myrow[3]; $start_date= $myrow[4]; $end_date = $myrow[5]; $secr_recd=$myrow[6]; $facilitator = $myrow[7]; }Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource
-
$reg_id = 001; echo "$reg_id"; $reg_id++; i want it printed out as 001 insted of 1.
-
when i write '001' in the form, the output appear '1' . how to make it become '001' ?
-
hi, i got problem with this the result suppose to be "reg_no " First, i need to select reg_no from reg_no. then the reg_no will store in databse and the id will ++1. how to write that?
-
thanks a lot
-
hi, why i getting this error? i can't figure out what's the problem SQL query: INSERT INTO report( work_id, reg_no, unit, title1, fault_rep_id.start_date, end_date, secr_recd, facilitator ) VALUES ( '$work_id', '$reg_no', '$unit', '$title1', '$fault_rep_id', '$start_date', '$end_date', '$secr_recd', '$facilitator' ) MySQL said: #1136 - Column count doesn't match value count at row 1
-
i'm using mysql as my database. Table A Staff no Name Details. check for duplicate by details ...
-
that mean stil need to click on submit button in order to display the name?
-
example of the code?
-
that's mean user still need to click on submit button in order for the name to appear? what i want is when user enter their staff no, it automatically generate the name in the same form with staff no.
-
can you explain more details as i'm new with this. thanks