I have a for with multiple test input fields. Specifically the user submits multiple names and ages. The form is submitted using the POST method. Here is a code snippet:
Code:
<form action = {$_SERVER['PHP_SELF']} method = 'post' >
for($i=1; $i<=10; $i++){
<input type = 'text' name = 'name[]' size ='25' maxlength = '50' />
<input type = 'text' name = 'age[]' size ='25' maxlength = '50' />
}
<input type="submit" />
</form>
I want to check if the user clicks submits without entering values in the text fields.
I have tried this:
Code: if(empty($_POST['name']) && empty($_POST['age'])){
echo "All the entries were blank, please enter name(s) and age(s) on the left and click submit. Thank you.";
}
However, this doesn't parse as "true" when I click submit with the fields empty.
Is it not possible to use "empty()" with arrays and/or multidimensional arrays?
pass form variables straight to email, no database required?
hello all,im working on this form...http://www.adobedayevents.com/project_request/project_request.phpWhat we want to use this form for, is for our client Adobe, to have there field marketing managers
Creation of Raw Exposure manually
SAP Gurus
pop3 and fsockopen
So I am able to connect to the pop3 server, log in, and check how many messages there are. I am having a problem with server responses though.In the following code, I don't understand why on the
XML Grouping
I'm using xml_parse_into_struct to get all my elements, but now I need to group them. For example, here's the XML<categories> <category id="12345">
get multiple rows
Hi I want to get multiple rows from a dbI am using this for the db queryCode: public function getCeleb($product_id) { $query = $this->db->query("SELECT * FROM " .
php wont update my db
hello,sorry for posting in mysql forum but i dont know where exactly is the problem but here is the linkhttp://www.phpfreaks.com/forums/index.php/topic,272737.0.htm
turning an array into a string then poping it into a db
Hi im just wondering how you get a requested array into a single string then pop it into the db so far i gotprint_r($_REQUEST['choice_name']);whch echosArray ( => Colour=Blue [1] =>
Syntax error
hi im having a little trobble with this script --------------------------------------------------------------------------------------------error
breaking a text file into paragraphs based on strings
I have a text file of email addresses that is all squished together. It looks like this: abcd@gmail.comfefef@mail.comfefefef@yahoo.comfewferf@mail.net...What I want to do is insert a paragraph after
Two fgetcsv related questions ;D
First of im trying to get a file from a merchants server but the directory is protected, I know the user and pass obviously but im wondering how i can pass the login details through to the script