Jump to content

anky4588

Members
  • Posts

    6
  • Joined

  • Last visited

Profile Information

  • Location
    INDIA
  • Interests
    PHP

anky4588's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. IF I am selecting a vlaue in drop down list then how can I use that selected vlaue in php as we can use it in javascript?
  2. now i want to insert a value through text box for the respective value of drop down list.plz help me.
  3. I jzz want that whenever I select a option in my drop down it's respective name and price is shown in my labels,I want it dynamically ie through my database,plz provide me the code,I used your opinion birbal.I am pasting my code plz see to it. <html><head> <title><center>Purchase Item</center></title> <style type="text/css">.main_box{width:600px;height:400px;border:1px solid#ccc;margin:0;padding:10px 15px;;background:#FFBF80;}.left_box{width:200px;height:25px;text-align:right;padding:0 5px 0 0;margin:5px 5px;float:left;}.seperator{width:10px;height:25px;padding:0 5px;margin:5px ;float:left;}.right_box{width:300px; height:25px; margin:5px; padding:0 5px; float:left;}.clear{clear:both;}</style><h1>PURCHASE</h1></head><body><div id="1" class="main_box"><div class="left_box"> <b> PRODUCT CODE</b></div><div class="seperator">:</div><div class="right_box"> <select name="optionList" id="optionList" onchange="copy();" ><option value="Select your Option " ></option> <option value="RAM" >PR1</option> <option value="KEYBOARD" ">PR2</pption> <option value="SPEAKER" >PR3</option> <option value="LED">PR4</option> </select> </div><div class"=clear";></div><div class="left_box"><b>PRODUCT NAME</b></div><div class="seperator">:</div><div class="right_box"> <div id="label"> <script language="javascript">function copy() { document.getElementById("label").innerHTML = document.getElementById("optionList").value}</script> </div></div><div class"=clear";></div> <div class="left_box"> <b> PRICE</b> </div> <div class="seperator">:</div> <div class="right_box"> <input type="text"/> </script> </input> </div><div class"=clear";></div> <div class="left_box"> <b> QUANTITY</b> </div> <div class="seperator">:</div> <div class="right_box"> <input type="text" id="quantity" value="" /> </div><div class"=clear";></div> <div class="left_box"><input name="submit" type="submit" value="SUBMIT"></div><div class="right_box"><div class="seperator"></div><input name="clear" type="reset" value="CLEAR"></div></div> </div> </form> </body></html>
  4. thank u so much,will try it and reply you back
  5. hello everyone,I am new to the PHP platform so just needed help of yours,As I m designing a form in which I have used a drop down list,so i just wanted to know how to show the respective product name and its price in the label or text box when I am selecting respective product Id in the drop down list. purchase.php
×
×
  • Create New...