You should always run your variables through mysql_real_esca pe_string before putting them into a query.
True....
User Profile
Collapse
-
Hi Lisa,
Code:if ($_POST['campustype']=='') { $arrErrors['campustype'] = 'Please select category.'; } else { switch ($_POST['campustype']) { case "in": if ($_POST['howt']=='') $arrErrors['howt'] = 'select one field.'; break; case "out": if ($_POST['hot']=='') $arrErrors['hot'] =
Leave a comment:
-
Are you sure you are creating an Excel spreadsheet? Looks more like you are creating an HTML file similar to one created by Excel.
To create an Excell file, you need a whole different approach.
I often output a CSV file, which Excel can open, but I have never tried to include images. There is also a PEAR thing called something like Excel Spreadsheet Writer which is pretty powerful - it may be what you need.Leave a comment:
-
Code:$query=mysql_query ("SELECT training_id from training where courseTitle='{$_GET['item']}' ");
Leave a comment:
-
Just a thought - basing an update on "where password =" is a tad risky. If your passwords are not unique, you will update all records with the same password, and if passwords are unique, you have opened a possibility for someone to figure out existing passwords.Leave a comment:
-
You could calculate the answer by multiplying the size of the page being read by the number of times per year it is read, and working out the cost of the bandwidth consumed. May not be 100% accurate, but will provide an indication....Leave a comment:
-
You are not providing enough information: do you want to do a validation at the server to check that a value has been selected from at least select?
Code:<?php if (empty($_REQUEST['select1']) && empty($_REQUEST['select2']) ) { echo "You have to select something somewhere!"; // do error stuff } ?>
Leave a comment:
No activity results to display
Show More
Leave a comment: