Jump to content

funbinod

Members
  • Content Count

    499
  • Joined

  • Last visited

Everything posted by funbinod

  1. i think thats not the solution to my problem. my problem IS NOT that i could not extract data from table. my problem IS i coludn't put that data in a DROPDOWN list. or i didn't understand ur sugestion?????
  2. i created loop for selecting from all the rows of a table like this--- <?$rows = mysql_num_rows($result);for ($n = 0 ; $n < $rows ; ++$n) { echo '' . mysql_result($result,$n,'item') . '<br />'; }?> and tried to put in dropdown menu like this ---- echo '<form action="#" id="test" name="test">';echo '<select name="item">';echo "<option></option>";echo "<option>";{echo '' . mysql_result($result,$n,'item') . '<br />';}echo "</option>";echo '</select>';echo '</form>'; but returned error "Warning: mysql_result(
  3. tried to put in dropdown menu like this ---- echo '<form action="#" id="test" name="test">';echo '<select name="item">';echo "<option></option>";echo "<option>";{echo '' . mysql_result($result,$n,'item') . '<br />';}echo "</option>";echo '</select>';echo '</form>'; but returned error "Warning: mysql_result(): Unable to jump to row 2 on MySQL result index 5 in .................................."
  4. i created loop for selecting from all the rows of a table like this--- <?$rows = mysql_num_rows($result);for ($n = 0 ; $n < $rows ; ++$n) { echo '' . mysql_result($result,$n,'item') . '<br />'; }?> but couldn't insert it into a dropdown list. please guide...
  5. wow! and i got it! i just edited this to - $("#add").val($("#shipAdd").val()); and it worked....
  6. wow! thank u both of u for the guidance. i made it work now. now i again stuck on retriving data for "Billing Address" from "Shipping Address" field for 'IF CHECKED' clause. i tried this $("#add").val($("#shipAdd")); but it didn't work. please guide...
  7. i tried this - to disable form field if CHECKED and if UNCHECKED cancel disable. but it didnt work on my browser "chrome 33.0.1726.0" and "IE 11". please help me find out the error..... please help me find out the error ------ <form action="#"><h3><u>Shipping Address:</u></h3>Address:<input type="text" name="shipAdd" id="shipAdd"><br /><br />City:<input type="text" name="shipCity" id="shipCity"><br /><hr align="left" width="15%" noshade color="#996666" />Billing address same as shipping address.<input type="checkbox" nam
  8. how to make a dropdown menu on a FORM with the datas from a column of a database table like items from all rows of a "MEMBERS" table's "NAME" column
  9. sorry sir! i didnt meen to make u do my work. actually i'm not doing any work. m not in any mission. i just imagined something and tried to do it. but i forgot that i'm nothing on coding. i've just started learning php and i tried on applications. i know almost nothing about php & mysql, that's why i stuck on every step i move on. since i'm very new on coding, it was bitta difficult for me to understand, so i asked u for direct help. i didnt imagine it will be kind of asking to do work in my favor. but i think i got some idea from this reply and i can try my code now. i'll try and will
  10. i want to know if it it possible to make desktop application using PHP & MYSQL or not. if yes please suggest any application for that or some ideas....
  11. didn't u see the image!? sorry for that. i think the attached image describes my problem. sorry! i'vent attached my code. u might be more confused seeing my code . (coz m very fresh on coding) please try understanding from the image attached. if u still got confused, i'will post what i've written..... thank u for kind reply.
  12. i'm sorry sir! but its completely confusing for me. i cant understand how is this made done. can u please, if u dont mind, write that code, for example, so that i can understand this more easily. what i designed the invoice and wish it to do is like this--- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>TEST CASHIER</title> <link rel=stylesheet hr
  13. thank u! i think this is now on the way to my goal. i tried ur suggestive code as my own like this - <?$icode = '$_POST[icode]';$stmt = mysqli_prepare($con, 'SELECT icode, item FROM stock WHERE icode=$_POST[icode]');mysqli_stmt_bind_param($stmt, 's', $icode);mysqli_stmt_execute($stmt);mysqli_stmt_bind_result($stmt, $icode, $item);while (mysqli_stmt_fetch($stmt)) { echo $item;}?> buy it showed no result. please help finding problem. thank u
  14. sorry sorry! i think i wrote wrong. i wish a TABLE be treated as FORM, not FORM as TABLE. and more important is "MOVE EVERY DATA FROM A DATABASE TABLE TO ANOTHER AND DELETE IT WITH A SINGLE SUBMIT". can u please help me with this...???
  15. i want to try an invoice script but got confused at one place. how to get information from a database table with MANUALLY SELECTING 'WHERE' clause? i wish a code be entered manually on a form and its details be displayed automatically. attached is the file what i made and it describes what i wish to be. please guide.
  16. thank u. can't the table be treated as form!? i mean all are coded in FORM but displayed as TABLE! if not could we MOVE all data from a database table to another and delete it with a single SUBMIT!?
  17. please help me inserting data to mysql database table from a html table. like <table> <tr> <td>name</td> <td>Gender</td> <td>age</td> <td>school</td> </tr> <tr> <td>John</td> <td>Male</td> <td>21</td> <td>Oxford</td> </tr> <tr> <td>Juliya</td> <td>Female</td> <td>25</td> <td>Oxford</td> </tr><!- bla! bla! bla! --></table>SUBMIT I want to send all the rows' data at once to a table.
  18. thank u again. and again confusion continues. (sorry! its because am newbie in php or programming) let me explain differently. if 'peter' is selected as 'first name', then it echos his 'last name'. i understood this line. but if i want to echo 'last name' of another name (lets say 'john') then should i have to write another code like <? $result = mysqli_query($con,"SELECT * FROM PersonsWHERE FirstName='John'");while($row = mysqli_fetch_array($result)) { echo $row['FirstName'] . " " . $row['LastName']; echo "<br>"; } ?> and similar for each name! or can i write
  19. thanks justsomeguy for ur kind reply. i've just begun working with databases. i've used SELECT & WHERE command that was taught on w3schools. but that taught selecting with one particular information. but i wish selecting from all rows.(m not sure how to explain either) w3schools taught me selecting from a single row like - <?php$con=mysqli_connect("example.com","peter","abc123","my_db");// Check connectionif (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); }$result = mysqli_query($con,"SELECT * FROM PersonsWHERE FirstName='Peter'");whil
  20. am very fresh in php and whatever i learnt is from w3schools. i am trying to create invoice script. for this i wish if automatic display of "item name" & "price" by entering just "item code" be possible. there is a table for stock item with rows "item code", "item name", "price". please guide me. thank u.
×
×
  • Create New...