Hi,
I want to make it possible for the administrator to log in as a fontend user from the backend. Right now I'm using two sessions (sessions with different names), one for the admin and one for the frontend.
Is it possible to write in the first session, close it and then open a new session?
This is a simplified version of what I atte...
I've been searching everywhere and there seems to be very little about Zen Cart... at least anything much deeper than "install and go". I'm skinning (templating) a Zen Cart store, but the design I want doesn't fit in with the current layout, so I've had to make extensive changes to tlp_header.php, tpl_footer.php, tlp_main_page.php, etc.
...
I'm interested in the way Sonic Living detects your iTunes library XML file. It prompts the user to approve its actions, then automatically uploads the XML file based on the client OS (and assuming the default installation path of iTunes).
How the heck does it do that? None of the upload libraries I've looked at have this feature. They ...
OK so let's say I have a textarea on the top of my browser and a text input box on the bottom. I want to connect a MySQL database and also whatever I type in the input box to appear in the text area. Sorta like a text RPG...
I know PHP, MySQL, good AJAX, and little jQuery. I just want to know how this is achieved. Thank you.
...
I have constructed the following -
`$format_$game_$name_$season`
4 variables with underscores between. Should this work, or will it act as one variable?
THankyou
...
I think the title pretty much says it all.
I'm working with Mongodb in PHP using the pecl driver. My updates are working great, but I'd like to build some error checking into my funciton(s).
I've tried using lastError() in a pretty simple function:
function system_db_update_object($query, $values, $database, $collection) {
$conne...
I have a method in a class trying to return a pointer:
<?php
public function prepare( $query ) {
// bla bla bla
return &$this->statement;
}
?>
But it produces the following error:
Parse error: syntax error, unexpected '&' in /home/realst34/public_html/s98_fw/classes/sql.php on line 246
This code, however, works:
<?php
...
Often I just need to get a single value from MySQL that I know exists there. I use the following construct:
$result = end(mysql_fetch_array(mysql_query('SELECT FOUND_ROWS()', $db)));
Is there a proper single function in PHP that would do this?
...
I'm looking for the "best practice" way to achieve a message / notification system. I'm using an OOP-based approach for the script and would like to do something along the lines of this:
if(!$something)
$messages->add('Something doesn\'t exist!');
The add() method in the messages class looks somewhat like this:
class messages {
...
I have two foreach statements. The variable from one one is somehow getting into another and i'm not sure how to fix it.
Here's my controller:
// Categories Page Code
function categories($id)
{
$this->load->model('Business_model');
$data['businessList'] = $this->Business_model->categoryPageList($id);
$...
<?php
$sql = "
SELECT e.*, l.counts AS l_counts, l.date AS l_date, lo.counts AS lo_counts, lo.date AS lo_date
FROM employee e
LEFT JOIN logs l
ON l.employee_id = e.employee_id
LEFT JOIN logout lo
ON lo.employee_id = e.employee_id
WHERE e.employee_id =" .(int)$_GET['salary'];
$query = mysql_query($sql);
$rows = mysql...
I ask this question because i learned that in programming and designing, you must have a good reason for decisions. I am php learner and i am at a crossroad here, i am using simple incrementation to try to get what im asking across. I am certainly not here to start a debate about the pros/cons of referencing, but when it comes to php, ...
Hi,
I use in my code :
preg_match( '!http://[^?#]+\.(?:jpe?g|png|gif)!Ui' , $str[1], $results );
It work in most cases except:
src='http://www.domain.com/Pic/folder1/folder2/a.jpg_x.jpg' alt=
I get:
......older2/a.jpg
I need:
.....older2/a.jpg_x.jpg
any ideas?
Thanks in advance
...
i want my sign up form to be secure from hacker..i want all secret information can't easily open by wrong people..
i wan't some data become encrypted..
how to make it??
...
This has bothered me for quite a while, but now it is necessity that I find the answer.
We are working on quite a large project using CodeIgniter plus Doctrine.
Our application has a front end and also an admin area for the company to check/change/delete data.
When we designed the front end, we simply consumed most of the Doctrine cod...
New to json data and struggling i guess the answer is real easy but been bugging me for the last hour..
Sample data
{
"data":
{
"userid": "17",
"dates": {
"timestame": "1275528578",
},
"username": "harino54",
}
}
Ok I can pull userid or username easy enoug...
you guys ever saw that FB scrapes the link you post on facebook (status, message etc.) live right after you paste it in the link field and displays various metadata, a thumb of the image, various images from the a page link or a video thumb from a video related link (like youtube).
any ideas how one would copy this function? i'm thinkin...
I have an input form connected to a database.
After [the form is submitted], I want to make a form to show all the data which has been input to the database. I want to show this data in table sortable by name or date.
Please help me.
...
can you tell me how server handles different http request at a time. If 10 users logged in a site and send request for a page at the same time what will happen?
...
How can I sort this array by city or by id in descending order?
if ($num > 0 ) {
$i=0;
while ($i < $num) {
$city = mysql_result($result,$i,"city");
$state = mysql_result($result,$i,"state");
$id = mysql_result($result,$i,"id");
echo "$city";
echo "$state";
++$i; } } else { echo "No results."; } ?>
...