i have this search form that works well except for 2 things.
1) on IE when i hit enter instead of the Submit button, i do not get any result. with firefox, no problem.
2) when i hit submit or enter without putting anything on the search form, it outputs All data from the database.
any help to fix the issue?
Line number On/Off | Expand/Contract <script type="text/javascript" language="JavaScript">function countryempty(){ if ( document.form.country.value == '' ) { alert('No search was entered!') return false; }}</script> <?$country = $_POST["country"]; // if page is not submitted to itself echo the formif (!isset($_POST['submit'])) { ?> <form method="POST" action="<? echo $PHP_SELF; ?>" onSubmit="return countryempty();"> <p><b>SEARCH</b> a City or Country <input type="text" name="country" size="32"><p> <p>
<input type="submit" value="submit" name="submit"><input type="reset" value="Reset" name="B2"></p> </form> <? } else {?> <? $db_host = ''; $db_user = ''; $db_pass = ''; $db_name = '';$db_table = ''; $conn = mysql_connect($db_host,$db_user,$db_pass); mysql_select_db($db_name,$conn); // The database query follows
Typing math
I've added support for typesetting math using LaTeX on the forums.Example:Code: [Select][tex]\sum_{n = 0}^\infty \frac{1}{n!} = \lim_{n\to\infty} \left(1+\frac{1}{n}\right)^n = e[/tex]Outputs:Just in
How do i do multi uploads?.
Hey i would like to do this : http://hosting.mrkrabz.net/I've got the base down you can upload single files, But how would i make it so when you click a button it adds a new field for a file to be
Storing the referrer in session... problems with tabs
Hello AllI am currently working on an ERP project based on the MVC methodology, when a user navigates the site we store the referrer in session.The problem we have is that using multiple tabs upsets
About imagecopyresampled()
Hello,I am looking to use this function to resize parts of an image to a fixed thumbnail size. I have used this functions many times, but I am trying to become more advanced as time pass by.I have
A little help needed passing hidden values to next page
I have a page that has hidden values in a form.exampleCode: <input name='signupID' type='hidden' value='1' /><input name='signupID' type='hidden' value='2' /><input
Using loop to count number of entries
I'm writing a program that must ask user to type in numbers. After each entry, the program has to report the cumulative sum of the entries to date. The program should terminate when user enters 0.
* Gridview and Detailsview in UpdatePanel, insert mode problem
I have a GridView and DetailsView working together. When a record from Gridview is selected, DetailsView is opened for edit/insert/deletion of records. When user searches for a record and no record
How do I use a global footer..?
If my index.php has a bole bunch of if functions and exit's in them
Update Database
Hi All,I have a problem with this:Code: [Select]<?phpsession_start();include('../common/dbconnect.php');$stock_id = $_GET['stock_id'];$query='SELECT * FROM users_stocks WHERE user_id ="' .
MVC - Code review
I'm in the process of trying to wrap my head around MVC, and as part of that, I'm attempting to implement a super-tiny MVC framework.I've created some mockups of how the framework might be used based