How to use a foreach loop to dynamically execute a mysql query?

I am doing a simple database builder function that takes a question id, 4 options an id and a count variable.
All I want to do is in the foreach, take the options and carry out a mysql_query() on all the seperate options variables. As you can see I have put them in an array so [...]

Validate form in other table

I would like to validate the login data only when other tables are in agreement:
$username = anti_injecao(utf8_decode(clean($_POST[username])));
$password = anti_injecao(md5($_POST[password]));
$date = date(“Y-m-d”);
$time = date(“H:i:s”);
$sql = mysql_query(“select * from usr_users where username = ‘$username’ AND password = ‘$password’”);
$check = mysql_num_rows($sql);

Modifying javascript to output form name instead of form id

I made several input field boxes with the following code:
<script type=’text/javascript’>//<![CDATA[
count=$("#"+par_id+"> input").length;

File is repeatedly loading

Im really confused here. My code has working fine for months and now it just broke down. For some reason, in an included file, the document is constantly calling this function.

I get an infinite amount of alert windows. The same result came from a body onLoad function as well. And I [...]

php jquery – how to show another drop down option if a value is selected in first drop down

I have an upload form, for the first drop down, the category drop down, I want to echo another drop down list (book category) if the option value “book” is chosen
<form action=”uploadproc1.php” method=”post” enctype=”multipart/form-data”>

<p> [...]

Fatal error: Access to undeclared static property

I’m trying to use some extended Zend_Db_Table class from PHP CLI (Command Line Interface).
Everything is working as expected, when used via Apache. But when used from CLI I get the following error:

[01-Feb-2011 14:41:34] PHP Fatal error: Access to undeclared static property: KidsclubIdentities::$tableName in /home/www/

If I var_dump($tableVariables); die(); in the col() function of the class [...]

Check if user already likes fanpage

Is it possible to check if a user already likes my facebook fanpage from my website with Javascript or PHP?
EDIT: I need a solution, so the user doesn’t need to authenticate / allow some persmissions first

What is the best way to check if table exists in DynamoDB?

What is the best way to check if table exists in DynamoDb?
I would appreciate it if the code would be in PHP.
Either active or not.
* Added later as an example to various cases for error code 400
It’s very easy to check if the table exist, it can have one of the following
TableStatus => CREATING, ACTIVE, [...]

Backing Up Multiple MYSQL Databases and Sending to An E-mail (Code Adjustment)

I found this open source code not that long ago that allowed me to take all my databases, back them up and send them to an e-mail in a compressed file. Everything worked almost perfectly.
The code is designed to compress all the databases into one file, which is then zipped in a bz2 format. [...]

SQL Query: Hide items based on column value?

I am pulling some data from table in a MySQL database. Inside this table is a column called “hidden”, by default it is set to 0, but when an item needs to be hidden, it will be set to 1. So I need a code that I can use that will hide all rows if [...]

Hire Me
Follow Me!
Most Popular Articles & Pages
Because your vote is Important
Sorry, there are no polls available at the moment.