Hi all,
I am trying to save data into the same table several times from the same $_POST array. You see, on my registration form a family is allowed to specify the names, gender and age of all members they wish to bring along.
This data is being stored in a database table called aditional_member. Based on family size, I am dynamically ge...
Hi All,
I am having a weird mind gogling problem. Sorry in advance, If I confuse you.
I have following data
1 3 5
5 1 2
2 4 8
3 2 9
3 8 4
first column = source 1
second column = source 2
third column = result column
First and second column will can create 3rd column and that 3rd column can be used in
1st or 2nd column to make a new...
I have various HTML strings to cut to 100 characters (of the stripped content, not the original) without stripping tags and without breaking HTML.
Original HTML string (288 characters):
$content = "<div>With a <span class='spanClass'>span over here</span> and a
<div class='divClass'>nested div over <div class='nestedDivClass'>there</di...
http://php.net/manual/en/mysqli.init.php
$ConnectionResource = mysqli::init();
The above code fails with:
Fatal error: Non-static method mysqli::init() cannot be called statically
How come?
...
So I've got some images stored in a MySQL database as BLOB's (I know it's better to just store the directory and do it that way, but this is what I need to do for now) and I need to display them on a webpage. Now, I know how to make a script and give it an image header and pull the img src from there, but I have a lot of images from diff...
Warning: imap_open() [function.imap-open]: Couldn't open stream {imap.gmail.com:993/imap/ssl}INBOX in /home/happy/public_html/source/imap/fet_mail_from_email_add.php on line 7
can't connect: Can't connect to gmail-imap.l.google.com,993: Connection timed out
my snippet is
$mbox = imap_open("{imap.gmail.com:993/imap/ssl}INBOX",
...
I'm looking for a way to sort an array, based on the information in each row, based on the information in certain cells, that I'll call columns.
Each row has columns that must be sorted based on the priority of: timetime, lapcount & timestamp.
Each column cotains this information: split1, split2, split3, laptime, lapcount, timestamp.
...
Possible Duplicate:
.NET & ASP vs PHP
Are there speed differences, performance issues, and what reasons do businesses have when they choose one or the other, is the learning curve steeper for one over the other?
Also... are you likely to be paid more using one over the other?
...
Hey all,
I'm trying to do some templating optimizations and I'm wondering if it is possible to do something like this:
function table_with_lowercase($data) {
$out = '<table>';
for ($i=0; $i < 3; $i++) {
$out .= '<tr><td>';
$out .= strtolower($data);
$out .= '</td></tr>';
}
$out .= "</table>";
...
I was wondering what the best way is for storing and retrieving session values in PHP. I am building a php framework with an MVC structure. Now i have a registry class with inmportant object.
I have a class for the session, with some defined functions concerning the session. Now I was wondering if it is a good practice to just use
$_S...
Is it possible to assign php array in MySQL IN() function? for example,
$numbers = array('8001254656','8886953265','88864357445','80021536245');
$sql = mysql_query("SELECT * FROM `number_table` WHERE `number` IN ($numbers)");
Any Ideas?
Thanks,
...
how to hide load url in jquery?i want to hide pmscount.php
{
$('#notification').load('pmscount.php').fadeIn("slow");
}, 10000);
...
Hey all,
I'm trying to figure out how to know what has been done to a variable.
Here's an example:
function a($hello) {
$out .= strtoupper(ucwords(strtolower($hello)));
return $out;
}
echo function_trace('$hello') // returns array(strtoupper,ucwords,strtolower)
Thanks!
Matt
...
I'm trying to build a form using php & jquery, but I'm a little confused as to what to do with the jquery portion of it...
Basically, when the user submits the first form, I want to direct them to the "next step" form, but I want to retain the values submitted from the first one in a hidden input field...
If someone can either show...
We have a large number of data in many categories with many properties, e.g.
category 1: Book
properties: BookID, BookName, BookType, BookAuthor, BookPrice
category 2: Fruit
properties: FruitID, FruitName, FruitShape, FruitColor, FruitPrice
We have many categories like book and fruit. Obviously we can create many tables for them (M...
Hello, I am trying to fix this pagination script. It seems when I click on the pagination links [1][2][3][4]or[5] , it doesn't work. It just shows the first page and when clicking on the next numbers nothing happens. I hoping someone can see something in the script that I can not see.
The main page looks like this (pagination.php):
<?p...
I have an XML file full of bookmarks from Google Bookmarks. (File: http://gist.github.com/324844) I want to pull the bookmark based on this path: xml_api_reply->bookmarks-bookmark->labels->label.
So, my question is How can I use SimpleXML to grab the bookmarks that have the label Inspiration? Some bookmarks may have more than one bookm...
You can use arrays with str_replace():
$array_from = array ('from1', 'from2');
$array_to = array ('to1', 'to2');
$text = str_replace ($array_from, $array_to, $text);
But what if you have associative array?
$array_from_to = array (
'from1' => 'to1';
'from2' => 'to2';
);
How can you use it with str_replace()?
Speed matters - arra...
How to find out that foo is at the position of 2?: array('boo', 'moo', 'foo');
...
I have the following PHP script:
<?php
$fortune = `fortune`;
echo $fortune;
?>
but the output is simply blank (no visible errors thrown).
However, if I run php -a, it works:
php > echo `fortune`;
Be careful of reading health books, you might die of a misprint.
-- Mark Twain
php >
Am I missing a config directive or some...