How would i go about creating a pull down menu in php, i have created an web to email form and would like to put a list of referrers in it
any help would be greatly apprieciated.
Thanks!
How would i go about creating a pull down menu in php, i have created an web to email form and would like to put a list of referrers in it
any help would be greatly apprieciated.
Thanks!
Creating menus on web pages is a client-side job; PHP is only for server-side scripting.
You'll need to use JavaScript (or similar) to make your menus work; while PHP will be used to generate the HTML/JavaScript for the menus.
Try googling for JavaScript menus and you'll get millions of results!
so i take it i can put some javascript straight into my php form?
im kinda new to php so bear with me,
would pieces of javascript still allow the information to be sent back via email?
Your PHP scripts can output whatever they (you) want. If you want to generate a JavaScript function you just get your PHP script to generate the necessary HTML:
<?php
...
?>
<script language="JavaScript">
<!-- foo bar -->
</script>
<?
...
?>
similarly with a JavaScript event handler:
<div id="main_menu" onmouseover="<?= getMouseOver('main_menu') ?>">
<!-- foo bar -->
</div>
I assume that you are either using PHP's server-side email functions or using a form action or href with the 'mailto:' protocol. Either way, you can have whatever HTML you need in your web page.
I suggest you get coding and ask any specific questions as they arise. We'll be more than happy to help :-)