Hello again, Michael!
You ought to read this:
http://de.php.net/manual/en/language.types.string.php#language.types.string.parsing
Daniel
Harlequin wrote:
Could someone please help me with my syntax here...?
$MembersDataQry = "SELECT * FROM MembersData
WHERE UserID='$_SESSION['logname']'";
I get an
Hello Frédéric.
This is neither a bug nor a paradox. The code you've posted just
contains some nonsense.
$foo['bar'] = 'bar'; cannot work since $foo is an object and not an
array. And even $foo->bar = 'bar'; cannot work because there is no
property $bar.
Frédéric hardy wrote:
Hello -
I think t
l about __set() and __get().
And read http://www.php.net/~helly/php/ext/spl/index.html about
arrayAccess.
Php 5 allow you to "overloading" property dynamicaly with __set() and
__get(). And you can access an object like an array with arrayAccess
interface.
There is no nonsense in my cod
Anthony Ritter wrote:
I get a:
Warning: Invalid argument supplied for foreach() in
c:\apache\htdocs\or_6.4.php on line 15
after submitting the form.
Hello Anthony!
As long as you don't submit the form with a single option selected there
will be no $_POST['lunch'], therefore foreach() won't be able
[EMAIL PROTECTED] wrote:
here is the whole query:
$query = "INSERT INTO inmarsat_comp SET date_added=NOW(), prefix='$prefix',
firstname='$firstname', lastname='$lastname', job_title='$jobtitle',
company_name='$company',
no_of_employees='$employees',address_1='$address1',address_2='$address2',
addre
Daniel Kullik wrote:
[EMAIL PROTECTED] wrote:
here is the whole query:
$query = "INSERT INTO inmarsat_comp SET date_added=NOW(),
prefix='$prefix',
firstname='$firstname', lastname='$lastname', job_title='$jobtitle',
company_name='$company
Harlequin wrote:
Morning everyone.
I've read around the subject of searching and although using the FULLTEXT
capability of MySQL might be the proper way of doing this I feel it's
somewhat limited and have decided to use a simple select procedure.
I'm sure there's a better way of doing this, as I
Cheseldine, D. L. wrote:
Hi
I'm stuck on The Basics page of the php5 Object Model:
http://uk.php.net/manual/en/language.oop5.basic.php
The top example has the code:
A::foo();
even though foo is not declared static in its class. How does it get
called statically without being declared static
Eli wrote:
Hi,
Having this array:
$arr = array(
'my var'=>'My Value'
);
Notice the space in 'my var'.
Converted to object:
$obj = (object)$arr;
How can I access $arr['my var'] in $obj ?
-thanks!
print $obj->{'my var'};
$obj->{'my var'} = 'My New Value';
print $obj->{'my var'};
Frank Rust wrote:
I try to check if a session is registered. This works fine if
I first do some output
echo "abc";
if (!session_is_registered('userid')) { do_something(); }
else { redirect_to_somewhere(); }
and I can't redirect to another page ...
If I comment out the echo statement I get alw
Tom Chubb wrote:
I ave a strange problem with my error reporting!
I have set php.ini to: error_reporting = E_ALL but I don't see any errors.
(After I was happy things were working on my Apache Test Server, I uploaded
to my web host and discovered errors.)
Thanks,
Tom
Make sure that "display_error
Vincent Dupont wrote:
Hi,
could anyone help on this 'by reference' problem.
I have 2 classes. The main class as a child class.
The child class has properties (array)
I would like to be able to manipulate the child's properties even after the child has
been inserted into the main class.
Does this m
[EMAIL PROTECTED] wrote:
Code I¹m using:
session_cache_expire(0);
session_cache_limiter('private');
setcookie("cookie","",0,"/","iffinet.com",1);
session_start();
I use session_destroy(); in the logout function but the /tmp/sess_* file
does not get deleted. Also the cookie doesn¹t go away even th
You might as well add a reference of your db-object to global scope.
[code]
$GLOBALS['_db_object'] =& $db;
[/code]
Then you could access it anywhere in your code like this:
[code]
$GLOBALS['_db_object']->sumbitQuery($query);
[/code]
Daniel
Angelo Binc2 wrote:
Ok guys, I have fixed the problem and i
Source: http://www.php.net/set_cookie
[snip]
Once the cookies have been set, they can be accessed on the next page
load with the $_COOKIE or $HTTP_COOKIE_VARS arrays.
[/snip]
Since PHP cannot access a cookie right after it has been set PHP cannot
be sure if the cookie has been accepted on client
Andre Dubuc wrote:
Orginally when I designed my site, I put the db access file, conn.php, in the
webarea - where all files reside. After reading a recent thread, I realize
that this may not be too secure. Therefore, I would like to shove conn.php
one level above the webarea. However, I don't fee
Harlequin wrote:
I have a user registration form that asks new users to register. However, Do
I post the MySQLconnection string in the page they are completing or in the
later page that the data is posted to, or both...?
You ought to tell your registration-page to redirect to itself right
after th
Afan Pasalic wrote:
July 6th? What are you talking about? Can you please give me more info
about that?
afan
Daniel Kullik wrote:
Note: You should checkout the thread 'Form Submission' started on July
6th since this is appearently not the best way to check if the user
hit the sub
John Nichel wrote:
Afan Pasalic wrote:
Daniel Kullik wrote:
Note: You should checkout the thread 'Form Submission' started on
July 6th since this is appearently not the best way to check if the
user hit the submit-button.
Daniel
July 6th? What are you talking about? Can you please gi
Harlequin wrote:
This is really confusing and I'm sure very simple to achieve.
I already have values selected that I want to open and edit:
$sql = "SELECT * FROM RegisteredMembers WHERE UserID='$_POST[TXT_UserID]'";
I basically want to recall these values on screen for the user to edit
themselves.
Justin French wrote:
Hi,
Looking for a one-liner to delete all empty elements in an array. I
know I can do it with a foreach loop, but I'm hoping that I've missed an
existing function in the manual which may already do this, or a simple
one-liner to replace the foreach.
$v) {
if(empty($v)
Daniel Kullik wrote:
Justin French wrote:
Hi,
Looking for a one-liner to delete all empty elements in an array. I
know I can do it with a foreach loop, but I'm hoping that I've missed
an existing function in the manual which may already do this, or a
simple one-liner to replace t
Skippy wrote:
I'm confronted with a somewhat weird problem and hopefully someone can make a
suggestion. I have to perform the following 3-step task:
Step 1. Someone provides a string (let's call it the formatting string) which
contains a PHP expression, which will apply a PHP function on another st
mysql_query() should return a boolean true if your insert-query works.
Check that.
[code]
print (mysql_query('insert bla...')) ? '(-:' : ')-:';
die();
[/code]
Cab wrote:
Ed,
Sorry it redirects now but on checking the database is no longer being
updated?
require_once('/home/virtual//var/www/cgi-bin
You should not overwrite the whole include-path. Just append new paths.
This should do:
[code]
// Expand include-path (';' on Windows)
$sep = ('WIN' == substr(PHP_OS, 0, 3)) ? ';' : ':';
ini_set('include_path', ini_get('include_path') . $sep .
dirname(__FILE__) . 'includes/');
[/code]
Daniel
A. L
clude 'includes/db.inc', would
work, since include_path is set to "." in php.ini, but it does not.
Any help?
On Fri, 2004-07-16 at 10:35, Daniel Kullik wrote:
You should not overwrite the whole include-path. Just append new paths.
This should do:
[code]
// Expand include-path (
Here you can find an overview of all existing MySQL functions in PHP:
http://www.php.net/mysql
And this is the function you are looking for:
http://www.php.net/manual/en/function.mysql-insert-id.php
And please take your time to look at this posting:
http://marc.theaimsgroup.com/?l=php-general&m=108
worked.
Any help?
On Fri, 2004-07-16 at 11:30, Daniel Kullik wrote:
Does your PHP-interpreter parse .inc files at all?
Did you get any error-messages? If not, set your error-reporting level
to E_ALL any force PHP to display errors on screen.
[code]
error_reporting(E_ALL);
ini_set('display_e
Hello.
Cannot find any unexpected dollar-sign ($) in this code.
But please enclose the associative array-indexes within quotation-marks
and run your script again.
[code]
$foo = $_POST['assoc_index'];
[/code]
Daniel
Harlequin wrote:
I've checked my syntax but obviously missing something.
Would any
Sounds pretty harsh, but Aidan is right.
Another suggestion:
Set error_reporting in your php.ini to "E_ALL" and display_errors to
"On". If you don't have access to the php.ini file you can try this:
[code]
error_reporting(E_ALL);
ini_set('display_errors', true);
[/code]
Paste these two lines of c
Skippy wrote:
On Mon, 19 Jul 2004 14:15:09 -0400 Jason Barnett <[EMAIL PROTECTED]>
wrote:
Markus Stobbs wrote:
$message = "
Name: $Name
Division: $Division
Phone: $Phone
Email: $Email";
...but when I change $Name and the other variables to $_POST['Name'], I
get this error:
Parse error: parse erro
Matthew Sims wrote:
I'm trying to use html_decode with the echo function but failed so far.
What would be the correct syntax?
TIA
You should read up on how to use mysql_result properly. Read through the
user comments for tips.
http://us2.php.net/manual/en/function.mysql-result.php
For example:
$
Man-wai Chang wrote:
> I tried to post to mysql.general, but the message never appeared. So I
> am trying my luck here.
>
> How could I build an index for a table created using the "CREATE
> TEMPORARY TABLE ... SELECT ... FROM ..." syntax, using an account
> without the privilege to use ALTER TAB
Stuart Felenstein wrote:
--- Jason Wong <[EMAIL PROTECTED]> wrote:
Maybe what you had before was:
if (count($myarray) > 5)
$_SESSION['arrayerr'] = "you have selected
too many industries";
session_write_close();
header ("Location: Page2.php?".SID);
exit;
And yes that has
34 matches
Mail list logo