1. This website uses cookies to improve service and provide a tailored user experience. By using this site, you agree to this use. See our Cookie Policy.
    Dismiss Notice

Quick PHP Form Help Needed

Discussion in 'General Programming Chat' started by gimme4free, Mar 19, 2009.

  1. gimme4free

    gimme4free Executive VIP Premium Member

    Oct 22, 2008
    Likes Received:
    I'm stuck on my laptop at the moment while I reinstall Windows on my PC (Gave up trying to fix it) and trying to make a form.

    The form is in java/PHP.

    I need the user to select a value from a dropdown list and then I also need a copy and paste box beneath it, such as:

    Select From List:
    (Options: Google, MSN, Live)

    Text Box:
    (http://<? echo "$option" ?>)

    And then depending on what they select in the first box it will change. I don't want the user to have to submit the form before the change, so it's like an on-the-go form where whatever they select and it comes up.

    Anyone got a similar form they can copy/paste here for me please? :)
  2. cyklotrial

    cyklotrial Regular Member

    Oct 13, 2008
    Likes Received:
    Simple HTML+jQuery.
    To make it work you have to download jQuery lib from :http://jquery.com/

    		<script type="text/javascript" src="jquery.js"></script>
    	<script type="text/javascript">
    	var message = new Array();
    	message[1] = "http://gogle.com";
    	message[2] = "http://amazon.com";
    	message[3] = "http://ebay.com";
    			var message_index
    			message_index = $("#item_select").val();
    			if (message_index > 0)
    	<select id="item_select">
    		<option>Select an Item</option>
    		<option value="1">google</option>
    		<option value="2">amazon</option>
    		<option value="3">ebay</option>
    <input id="test" type="text">	
    If you need more help shot me msg on e-mail (you know the address:) )

    Cyklotrial (Lukas)