Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
Ranked #27.9K
Ranked #4K
~8K People Reached
About Me

TomatoCMS, an open source PHP CMS powered by Zend Framework, jQuery and 960grid

Favorite Forums
Favorite Tags

7 Posted Topics

Member Avatar for PinoyDev

Name the form elements as array by using [] at the end of name property. 1) Form: [CODE=php] <?php while (&row=mysql_fetch_array($reclooptbl)) { ?> <tr> <td><input type="text" name="ratings[]" /></td> <td><input type="text" name="courseIds[]" value="<?php echo $row['courseid']; ?>" /></td> </tr> <?php } ?> [/CODE] 2) Process form when user click on submit button: …

Member Avatar for PinoyDev
0
132
Member Avatar for sakura_fujin

Try this: [CODE=sql] UPDATE your_table SET age_field = IF(age_field < DATEDIFF(DATE_FORMAT(now(), '%Y-%m-%d'), created_date), DATEDIFF(DATE_FORMAT(now(), '%Y-%m-%d'), created_date), age_field); [/CODE]

Member Avatar for darkagn
0
102
Member Avatar for albertef

Check the length of the field you want to insert. If length of this filed is 2, so it should insert "on" instead of full string as "On Process".

Member Avatar for mohamedsafiq
0
97
Member Avatar for aneeka

[code=php] $answers = $_POST['answer']; // Loop through it for ($i = 0; $i < count($answers); $i++) { echo $answers[$i].'<br />'; } [/code]

Member Avatar for tomatocms
0
99
Member Avatar for alumbagreenz

You have to use global keyword for variable if it has been defined out of function. So, the following code should work: [CODE=php] $filename = "names.txt"; $data = array(); $key = 1; # get the data from current file if (file_exists($filename)) { $data = parse_ini_file($filename, true); } function txtupdate($k) { …

Member Avatar for vaultdweller123
0
91
Member Avatar for venus_me11

Change your query string from [code=php] $query = "SELECT userid, username, password, userdesc FROM login WHERE (UserName='$u' AND Password='$p') and DelCategory='0'"; [/code] to: [code=php] $query = "SELECT userid, username, password, userdesc FROM login WHERE (UserName='".addslashes($u)."' AND Password='".addslashes($u)."') and DelCategory='0'"; [/code] Here I added slashes for parameters before executing query to …

Member Avatar for Manuz
0
181
Member Avatar for preetg

Try this: 1) Make a HTML more clear by using three separated fields for DOB filed: [code=php] <select name="yearOfBirth"> <option value="">---Select year---</option> <?php for ($i = 1980; $i < date('Y'); $i++) : ?> <option value="<?php echo $i; ?>"><?php echo $i; ?></option> <?php endfor; ?> </select> <select name="monthOfBirth"> <option value="">---Select month---</option> …

Member Avatar for tomatocms
0
7K

The End.