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?
Mysql query, two times?
Hello to all,I'm new to php coding and i like it alot. I need help with some noob stuff.1. Having problem with mysql query after submiting HTML form. It's allways execuding two times, that way i have
cURL and Sessions
Ohai.So, I'm trying to cURL a bunch of things off of a page, and put them into a session. I've added all of the items so they look like $_SESSION['fur'] = ge_item(6814)Now I just need to figure out
How to write on database when a link is clicked?
Hi,
help with image upload code
Hello,right now this code I have resizes images and then places them into the uploads folder is there a way to make this code upload the orignal file sizes into uploads and make it put the smaller
Undefined variable when using $_SERVER['PHP_SELF']
Hi guyz, please suggest me something...On first.php I have one input field NAME, and on posting the form it moves to "second.php" showing the entered value of input field using $_POST,
Logging and nologging bulk insert
Hi,
include problem
I have my root folder as:Code: $root = $_SERVER["SITE_HTMLROOT"]; // the server rootWhy does this not work when I want to include a php file:Code: include "$root/form.php";But the
images aren't rendering
I'm trying to call a JPG file from within PHP (in an effort to hide the actual JPG folder). The image is supposed to be called at domain.com/photo/?id=X&i=Y where X is the gallery ID and Y is
mySQL and PHP search
Hello,I am trying to code a project and ran into a brick wall with one of my pages. I am pretty new at php/mySQL and can not figure this out. Now I know that you are not going to sit there and type my
BIG file upload!
Hey guys!I'm trying to upload a file, it works well with smaller files but with 60mb+, I get a POST size error even though I've raised POST max size:Code: ini_set( 'post_max_size', '500M' );This error