Hi, im trying to adapt this little snippet:
$("#checkbox_id").change(function(){
/* CODE HERE */
});
I have a series of checkboxes that are dynamically generated and their id's are always like "hug3443" were "hug" is the column in the DB and "3443" is the unique id for each row.
My objective would be that every time the checkbo...
Hi,
I'm building a pseudo-variable parser in PHP to allow clean and simple syntax in views, and have implemented an engine for if-statements. Now I want to be able to use nested if-statements and the simplest, most elegant solution I thought of was to use identation as the marker for a block.
So this is basicly the layout I'm looking f...
Hey,
I have to work on this project written using Zend Framework. This is a project developed by somebody else that is unreachable at this time and I only have the php code but not the database.
I've never worked with Zend Framework but from what I've managed to understand it's using Zend_db to relate with a MySQL database. Like I said...
I have this code in a page that includes other files via GET request:
$page = strtolower($_GET['page']);
if(!$page or !$allow[$page] or $page == 'home') {
header("Location: home.php");
}
where $allow is a hardcoded array which contains a list of the allowed strings that are valid files to be included. Am I missing something obvi...
I have a string and I want to check that it only consists of digits. I don't really want to (or need to) parse it or anything, I just want to know that it does not contain anything but digits (and no floating point separator either, just digits).
PHP has this nice function called ctype_digit. Is there anything similar for C# anywhere in...
I have got a variable amount of items, and a variable date range that I need to distribute them over. Lets say I have 3 items and I need to distribute them over 6 days. What I would want is to have every second day have an item, and it does not matter if the first day has an item or not. If I had 7 items over 6 days, one of the days woul...
I'm generating a string in PHP and then eventually passing this string into a Javascript alert box, my problem is I actually can't add line breaks in my alert box.
My code looks as follows
$str = "This is a string\n";
$alert = $str."This is the second line";
if(!empty($alert)){
?>
<script type="text/...
I have finally got my paypal system working using IPN and a reservation system to ensure that two people do not buy the same product.
The problem is, the reservations last for 10 mins on my application. If a user reserves the product the 'timer' starts, he clicks pay and ends up on paypals website. He then leaves the computer for 10 min...
Hi,
I have the following form which allows a user to select dates/rooms for a hotel reservation.
<form action="booking-form.php" method="post">
<fieldset>
<div class="select-date">
<label>Arrival Date</label>
<select name="arrd" class="day">
<option value="1" >1</option>
... snip ...
<option va...
I have a JSON String like this
$test='{"var1":null,"var3":null,"status":{"code":150,"message":"blah blah"}}';
I want to access the status code in the function.
this is what i tried:
$responseObj=jsonService->decode($test);//this converts the string into an Object
echo $responseObj->status->code;
now this isnt working. Can someone ...
Ok, I am building a fairly large statistics system, which needs to allow users to requests statistics for a given set of filters (e.g. a date range).
e.g. This is a simple query that returns 10 results, including the player_id and amount of kills each player has made:
SELECT player_id, SUM(kills) as kills
FROM `player_cache`
GROUP BY p...
Hi friends,
I have an xml source for daily currency
http://www.tcmb.gov.tr/kurlar/today.xml
and i need to make a currency optional search for a portal. how can I get a specific data and convert from xml source? :/
i have a search form with:
price input
currency list box (euro, dollar)
and I need to convert the value from form for...
Hey!
How do I add the LIMIT 1 clause to an update when using Zend Framework?
I'm kind of forced not to use Zend_Db_Table_Abstract::update() since it executes itself unlike the sweet Zend_Db_Select-classes.
The reason to do this is just precaution and I think Zend_Db_Table_Abstract::update()'s syntax makes more sense when found in code...
I have a webpage to which any amount of URL varibales could be set.. examples:
index.php?source=lol
index.php?source=lol&sub=haha
index.php?aff=123
index.php?keyword=pizza
I want a way that I can detect that any url variable has been set, if a url variable has been set I want to print something on the page. Any ideas? I couldn't f...
I realize that you can't 100% know that this will work in all browsers. All I care about is IE 8, Chrome, and Firefox. I need some base headers that I can put at the top of my PHP pages to allow the Forward/Back buttons to load the cache.
Update: on every page I have a logged in user box at the top of the page which gives the user acc...
How can I make it so that content from a database is available to search engines, like google, for indexing?
Example:
Table in mysql has a field named 'Headline' which equals 'BMW M3 2005'.
My site name is 'MySite'
User enters 'BMW M3 2005 MySite' in google and the record will show up with results?
...
I have a PHP script that calls a .bat file using system(). The output is written to the screen and I derive some values from parsing this output. This is running on windows 2003 IIS server. PHP v5.2.0
Specifically I am using this script to launch an Amazon EC2 instance and assign an IP address to it. It has worked great for me so far bu...
I made a private section on a drupal site by writing a module that checks the RERQUEST_URI for the section as well as user role. The issue I am running into now is how to prevent those nodes/views from appearing in the search.
The content types used in the private section are used in other places in the site.
What's the best way to ge...
Im using this function simplexml_load_string() in my file which is doing search lucene based.
But its not working in php4.
please suggest me a function similar to this one so that i dont have to change my coding much.
this is the sample of my code :-
function handleResponse($data)
{
if ($data)
{
$xml = simplexml_...
I am using sugarCRM at my localhost.
For no apparent reason firefox is viewing the page in Quirks mode (the login page). This is completely messing up the page, here is a sample of the data shown:
��������Z�n7�-}v�fd4��q�Z�·8�ڱa�-�
f(�
5�rf��<�b���y�=��ftwRw�@"����m�<�2��^?}�
-��Ӌ�s���w|�#��Wo����U��'���a�n�{2��f0f1�E��~K���
...