I have the following class which handles my user logged in / logged out (I only included what's relevant here). I want to redirect users who are logged in who visit login.php to there account page. I do this using....
$User = new User();
if ($User->loggedin = 'true') header('Location:MyAccountNEW.php');
The issue is this redirects...
I am creating an application which tracks signatures form various organizations. I have a simple form which I can pass an ID to, so it will automatically select the right organization. The URL for add looks like this:
/signatures/add/3
The form works well. By passing 3, or any other ID, it automatically selects the right field, be...
I am trying to design database for a simple online shopping cart.I am not getting the idea of what to place for the table shopping cart.Is not it ok to create cart id as primary key?And later on while updating the items in a cart,what would be the appropriate logic to update only the changed field(say quantity) of a particular product?Pl...
Is there a way (ini setting or otherwise) to change the default quote setting for PHP's htmlenties function? I use it often with array_map which doesn't let you supply additional arguments.
...
The following is not achieving what I desire
<?
echo ob_start() . "<br>";
echo "1x<br>";
echo ob_start() . "<br>";
echo "2x<br>";
echo ob_flush() . "<br>";
echo "3x<br>";
echo ob_flush() . "<br>";
?>
The output is the following
1
1x
1
2x
1
3x
1
I am wanting something along the lines of
1x
3x
2x
I assume the problem is its putt...
Does anybody know of any? (I'd be using a php page to call the terms)
THANKS!
...
Hi there Guys.
I'm currently working on a new website and want to run Elgg (Elgg.org) on it. It's fully running on PHP5 and has a lot of rewrite rules defined in the .htaccess files. On the Elgg community I didn't found / get any answers, so I will try and ask them here.
I'm running multiple sites on my windows machine, now I want one ...
Hello to all,
I want to know about the how can we prevent the data lost (or) data theft in mysql database?
regards
babu
...
OK, so I've got this totally rare an unique scenario of a load balanced PHP website. The bummer is - it didn't used to be load balanced. Now we're starting to get issues...
Currently the only issue is with PHP sessions. Naturally nobody thought of this issue at first so the PHP session configuration was left at its defaults. Thus both s...
i have site that the user upload files (PDF,WORD,POWER POINT ....)
and they want to have the ability to search word in the files,
how can i do it ?
...
what is the best way to get data from external crawler to my DATA BASE, to my site
i work in LAMP environment,
is web services is good idea ? the crawler run every 15 minutes.
...
Hello,
I use JSON to encode an array, and I get a string like this:
{"name":"\u00fe\u00fd\u00f0\u00f6\u00e7"}
Now I need to convert this to ISO-8859-9. I tried the following but it fails:
header('Content-type: application/json; charset=ISO-8859-9');
$json = json_encode($response);
$json = utf8_decode($json);
$json = mb_convert_enco...
I'm using Actionscript 2.0 in combination with PHP, now I can make a call to my PHP file and receive data but apparently I have to use that data immediately, I cannot use it to fill my class variables.
This is what I want :
class user {
var lastname:String;
function user(in_ID:Number){
var ontvang:LoadVars = new LoadVars();
var ...
The situation:
index.php:
<?php
include("foo.php");
include("baz.php");
foo("bar.php");
?>
baz.php:
<?php
$x = 42;
?>
foo.php:
<?php
function foo($p) {
include_once($p); // please dont mind the inclusion hole
}
?>
bar.php:
<?php
echo $x;
?>
Zend notice: Undefined variable: x
Placing global $x;...
I'm trying to figure out how to set up a holding/"under maintenance" page in Zend Framework for when I am upgrading the database or something and don't want anyone using the site. I'd like to have a static HTML page and have all traffic redirected to that.
I'd rather not use .htaccess and would like to do it via the bootstrap file.
Any...
What is the best way to call a secured ASP.NET web service from PHP?
...
i want to post an xml document to a url, using simple php code.
i have a javascript code but the javascript will not support cross domain, so i just want to do it with php.
does any one have a code for this to support me...
...
My PHP files are not able to call the include function anymore. I suppose my hosting changed php settings. Is there any workaround to this problem? Can I enable the include function in php.ini/.htaccess files? How? My host is using PHP version 4.4.9.
EDIT - All the files that I am trying to include are local files and not files on anoth...
I am able to generate a link using my file upload system, now after five visits... i need the link if opened should display a message it has been expired.
<?php
function display_upload_form()
{
echo <<<DISPLAY_UPLOAD_FORM
<html>
<head>
<title>Yet Another Upload Form</title>
<style type="text/css" media="screen">
...
I need to make a PHP application that supports upload photos from mobile phone.
any idea how can I achieve that ?
...