Hi there
I am trying to make a very simple form validation function. I currently have the following
function formValidate($field, $msg) {
if (empty($_POST['$field'])) {
$errors[] = $msg;
} else {
$field = mysqli_real_escape_string($dbc, trim($_POST['$field']));
}
}// end of function
formValidate('form', 'You forgot to enter the form');
When I run the script and enter nothing into the $_POST['form'] field it still executes an empty record into the database.
What am I doing wrong?
New Search Engine problem
Hey everyone,I have a ZIP Code Radius search engine already functional. it displays all of the ZIP codes within a specified mileage around a central ZIP code.I have an auction site that the client
Help with ORDER BY
Hello. I would like to order by ascending States, then Cities, then Gyms in the following code, but I can't figure it out. If anyone could help, I would truly appreciated it! if(isset($countryid))
UDS 4.0 Datatype issue
UDS 4.0.322 -- connecting to NI Labview 9.0
Odd or Even
Inside of a while loop I need to echo several rows of info...easy enough.In the loop (for the sake off css) I need to distinguish between odd and even row numbers.Code:
Do While statement
hi guys,This may sound trivial but im new to php and as part of an assignmenti have to construct the 10 green bottles song using the do while statement. I can do the statement but it is itengrating
Recognising Revenue daily
Hello.
phph within href not showing php if change ? to &
Code: [Select]<a href="<?php echo $puser; ?>?m=<?php=(($m-1)<1) ? 12 : $m-1 ?>&amp;y=<?php =(($m-1)<1) ? $y-1 : $y
PHP Form to Variable.
Hi! I have written a HTML-form code in DreamWeaver CS3 (in a PHP doc) and I really need it to work soon :/I have a form:(<form name="form1" action=""
Comparing MySql data and arrays.
I have a mysql table set up like this:idsubjectbodyuseriddatetimetags1blog subjectblog body111|29|20099|30|AMblog,site news,techwhen displaying the data i want to be able to add
Which PHP-Editor do you think is the best?
Hi everyone, Myself Brian Anderson. For the last 2 years i have been working as a php-professional. I would like to conduct a poll for knowing which PHP-Editor you guys think is the