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?
IIS & NW MII on the same server
Hi,
How to change www in url with a specified name
HiI'm trying to change the url http://www.sitename.com/apparels to something like belowhttp://apparels.sitename.com/apparels in PHP.If anybody can help me with the code for the same or provide links
How To Make More Than One Redirection with PHP on the same page?
Hey im trying to do a direction page where it open differently link direction pages every time somebody enter it.. like this for example any good hint on how to do this?<?phpheader(
PHP page loading in Firefox but not in IE
hello,i am currently doing a project in PHP and i have a problem. If I view the project in Mozilla Firefox it works fine but if i open using IE i am having problem with the design which is not getting
am I using this for loop correctly
Dear buddies!
Weird MySQL error, why am I recieving this?
PHP Code:<?php require "global_settings.php"; ?><title><?php echo $sitetitle; ?></title><center><style
MySql timezone
Code: $sql = "SELECT *, date_format(date, '%m/%d/%Y at %I:%i %p' )as date FROM comments WHERE tutorialid='1' ORDER BY commentid DESC LIMIT $offset, $rowsperpage";Can I change the timezone
How to display random record from table?
I have the following code:Code: <?php $display_block .= "<input type=button value=\"Generate Random Monster\">";$get_monsters = "select * from
. and .. appearing instead of pictures
First of all, thanks very much for providing this forum. It is very much appreciated!My son-in-law created a php script for my website about 10 years ago to show pictures like a manual slideshow, and
TimeStamp Column Problem...
I'm mad at my self and thinking I'm a little retarded. It just be some one mistake I'm missing here. I coded my self a forum, when you reply to a topic, the topic's TimeStamp column is supposed to