In my database, there are some days with data and some without; I have one column with data, and another column with the date and time submitted. So I want to create this calendar. So it will show all the days in the month, and then the days with data will be a hyperlink. When I click the link, it will show all the data submitted on that...
Which one is better to fetch data from mysql database using PHP and why?
mysql_fetch_row()
mysql_fetch_assoc()
mysql_fetch_array()
...
i start a new session with : session_start();
then i set some session variables like this : $_SESSION['name']=$_POST['name'];
and some another variables.
at bottom of page i set header to diffrent page : header('location: index.php');
exit();
now in new page (index.php i can't access to my session variables, like $_SESSION['name'])
what...
My scenario:
$exTime = get_cfg_var("session.gc_maxlifetime")?get_cfg_var("session.gc_maxlifetime"):1440;
I'd like it to be like mysql:
$exTime = isnull(get_cfg_var("session.gc_maxlifetime"),1440);
or something like it that would also test for FALSE ideally. That way I'd only have to call the function once!
I know I could just ass...
I think the easiest way to ask this question is with the actual real-world situation I'm facing.
In our system, we have a Site model (classic MVC framework here) that represents a row in our site table. One of the fields of the site table that is stored in the Site model is the time zone of the site. We use this to adjust UTC datetimes ...
I need to validate human user by using captcha in PHP. Also the critical characters generated by captcha will be pronounced by an audio voice. Is it possible? If possible then how?
...
What I would like to do is something like this:
$method_result = new Obj()->method();
Instead of having to do:
$obj = new Obj();
$method_result = $obj->method();
The result doesn't actually matter to me in my specific case. But, is there a way to do this?
...
simple problem baffling me...
i have a function:
function spitHTML() {
$html = '
<div>This is my title</div>\n
<div>This is a second div</div>';
return $html
}
echo $spitHTML();
Why is this actually spitting out the \n's?
...
Anyone have any clean patterns for getting php vars into the js scope?
Two ways I have done it before is either injecting it with an actual call from the base template inside a document ready wrapper.
(jQuery/Smarty Template)
{literal}
$(document).ready(function() {
TargetClass.targetVar = {/literal}{$phpVar}{literal};
});
{/liter...
Possible Duplicate:
PHP: different quotes?
Simple question:
What is the difference between ' and " in php? When should I use either?
...
Hi! I'm trying to load data from database and display it in table like here:
http://img196.imageshack.us/img196/1857/cijene.jpg
In database i have 2 tables:
cities (id, name)
prices (id, city1_id, city2_id, price)
For example, the printed table for 4 cities would look like this:
<table>
<tr>
<td>city1</td>
<td> </td>
<td> </td>
...
The error I'm trying to get rid of is there is an additional letter "t" outputted before the rest of the HTML in one of my Zend Framework applications. The "t" is there only in a single action so I'm certain the problem is somewhere there.
For illustration HTML markup of the buggy controller action starts like this:
t<!DOCTYPE html PUB...
I want to make a conditional if statement that does this
if($get_['b']=="1") {
$offer1a=$offer1XXX;
$offer1e=$offer1YYY;
$offer2a=$offer2XXX;
$offer2e=$offer2YYY;
$offer3a=$offer3XXX;
$offer3e=$offer3YYY;
$offer4a=$offer4XXX;
$offer4e=$offer4YYY;
}
All the way to offer #12. It seems like a lot to write out. There are other valu...
My case is very simple, but I've read through many posts and tried the suggestions but can't seem to figure this one out....
session's variables are not passed to the next page in IE6.
Every page refresh creates a new session_id().
I'm using wamp/IE6, no software blocking cookies, and the privacy setting is set to Medium... I know i ca...
Hi,
MailChimp is a very nicely done service, where they tell you things like %clicked, and Google Analytics of recent email campaigns. They are similar to other sites like ConstantContact and CampaignMonitor, and many many others.
Is there anything similar to MailChimp which is open-source or free?
Or is there anything that could be ...
I have a little problem with dompdf,
Instead of generating the PDF, the screen just shows the following code:
%PDF-1.6 %���� 1 0 obj [/PDF/ImageB/ImageC/ImageI/Text] endobj 4 0 obj <> stream x����r�0��<���nH"�\�4�&ul:�Ǥ�cB��L��.� ~��!�踶,4�����92#���{�&'\� e����q���/� ���+^�N����*�}qW��o�$��8!��Z�4%���A6?��i��Rj��i��S�pp��4� �o�gU�,H���...
This one's puzzling me. I have a MySQL query, being run though PDO:
$stmt = $db->prepare( "UPDATE member SET acode='' AND status='active' WHERE username=:u" );
$stmt->bindValue( ':u', $member->username, PDO::PARAM_STR );
$stmt->execute();
The acode field gets set to 0 for some reason. It was created with
`acode` varchar(8) NOT NULL
...
I deleted my htaccess file from my gallery2, problem is I have the permalink and rewrite plugins running, now I can't get inside my admin panel to retrive the htaccess code.
Can somebody help?
...
I don't know if this is even possible with PHP, but I figured if it is, someone here will know how. I'm currently working on a project where users can customize a full body main avatar to be used throughout the site. There are a bunch of different face, hair, etc transparent png images that can be selected to make their custom avatar. ...
how can i get 2 pages, and output the difference between those. getting the pages not a problem, but stuck on how to get the difference....i need a library for ruby OR php
thank you.
...