Hi
i am creating a calendar i which i filled the year and date like this
<<<<< Year >>>>>>
<<<<< month >>>>>>
by clicking on the arrow marks the year and month can be increased and decreased
now i have to fill the dates for the year and month selected
I calcul...
Hi
How do I know how many seconds it will be until a php session expires?
I'm building a web application where users might spend a lot of time typing into big text fields, but for security reasons I still want sessions to time out after a reasonably short period. I want to warn them if their session is about to expire so they can save ...
When i try to include a file using include_once in php which shows warning like
Warning: include_once(1) [function.include-once]: failed to open stream: No such file or directory in /var/www/test/content_box.php on line 2.Actually file is there in my directory.I am using ubuntu (OS)
How can we prevent this warning.If anybody know please ...
Im new to PHP and I can't figure out what the rules are for using the echo function. For example, if I need to echo a large block of css/js, do I need to add echo to each line of text or is there a way to echo a large block of code with a single echo?
When I try to echo a big block of code like this one, I get an error:
if (is_single(...
I'm looking to create an on-site API reference for my framework and application.
Basically, say I have a class file model.class.php:
class Model extends Object {
... code here ...
// Separates results into pages.
// Returns Paginator object.
final public function paginate($perpage = 10) {
... more code here ...
Currently I using the following code to get my JSON output from MySQL.
<?php
$session = mysql_connect('localhost','name','pass');
mysql_select_db('dbname', $session);
$result= mysql_query('SELECT message FROM posts', $session);
$somethings = array();
while ($row = mysql_fetch_assoc($result)) {
$somethings[] = $row;...
I'm new to JQuery but for some reason I cant get the php code to display correctly when I put it in my JQuery script. The php code will display correctly when its not in the JQuery code can someone help me fix my JQuery code so it will display my PHP code correctly?
Here is the JQuery and PHP code.
var count = 0;
$(function(){
$('p...
Hi I have the following code;
if( ! empty( $post['search-bar'] ) ) {
$search_data = preg_replace("#\s\s#is", '', preg_replace("#[^\w\d\s+]#is", '', $post['search-bar'] ) );
$data_array = explode( " ", $search_data );
$data_array = "'%" . implode( "%' OR '%", $data_array ) . "%'";
$query = "
SELECT CONCAT( PROFILE_PROFF...
Hi,
I currently have a FileUpload.mxml component that uploads a .m4a to an oracle database, retrieves metadata from the file and saves the metadata info in the database.
to acheive this I use FileReference() and set up, amoung others, the dispatcher.addEventListener(DataEvent.UPLOAD_COMPLETE_DATA, completeHandler);
So the file is pos...
I have series of files like this:
foo1.txt.gz
foo2.txt.gz
bar1.txt.gz
..etc..
and a tabular format file that describe those files:
foo1 - Explain foo1
foo2 - Explain foo2
bar1 - Explain bar1
..etc..
What I want to do is to have a website with a simple search bar and allow people to type
foo1 or just foo and finally return the gzipp...
I have an array composed of arrays. I want to sort the parent array by a property of the child arrays. Here's an example
array(2) {
[0]=>
array(3) {
[0]=>
string(6) "105945"
[1]=>
string(10) "First name"
[2]=>
float(0.080878465391)
}
[1]=>
array(3) {
[0]=>
string(6) "109145"
[1]=>
stri...
I have a build a web portal based on the Cricket concept,
I have build a Custom based CMS where I can upload the News for the site
Once I upload the news, the URL Will be like this
http://cricandcric.com/news/news.php?id=841&An-emotional-moment:-Dhoni.html
But I am trying to have the above Url as follows (some thing like this)
ht...
Hi, I created a index.php file located in http://localhost/home/index.php. The file filled with the code below.
<?php
# //include the file
require_once("FirePHP.class.php");
# //create the object
$firephp = FirePHP::getInstance(true);
# //send information
$firephp->fb("Hello world!");
?>
I enabled fireBug and firePHP, BT...
My app has a 'Photo' field to store URL. It uses sfWidgetFormInputFileEditable for the widget schema. To delete the old image when a new image is uploaded, I use unlink before setting the value in the over-ridden setter and it works!!!
if (file_exists($this->_get('photo')))
unlink($this->_get('photo'));
Photos are stored in uploa...
I want to generate multiple pdf reports on click of single print button and zip all the pdf's and store it in a folder.
Any help please. I need this functionality in my project.
...
In html source
\xE6\x82\xA0
result is "\xE6\x82\xA0"
but in php
<?php echo "\xE6\x82\xA0"; ?>
result is "悠" (character for \xE6\x82\xA0 )
what can be done to make php echo \xE6\x82\xA0?
...
While trying to send a POST request via xmlhttp.open("POST", "url", true) (javascript) to the server I get an empty $_POST array.
Firebug shows that the data is being sent. Here is the data string from Firebug: a=1&q=151a45a150.... But $_POST['q'] returns nothing.
The interesting thing is that file_get_contents('php://input') does have...
Suppose in a file there is a pattern as
sumthing.c: and
asdfg.c: and many more.. with *.c: pattern
How to replace this with the text yourinput and save the file using php
The pattern is *.c
thanks..
...
Is it possible to put a table class in php, like this:
echo "<table class='xd' border='1'>
<tr>
<th>IDNO</th>
<th>ADDRESS</th>
<th>LASTNAME</th>
<th>FIRSTNAME</th>
</tr>";
I have a table inside a table. The outside table is html. And if I only put table in the css. It will affect both. But when I put class in the table with php scri...
Given any character from a to z, what is the most efficient way to get the next letter in the alphabet using PHP?
...