php-general Digest 11 Jul 2006 00:41:07 -0000 Issue 4232
Topics (messages 239243 through 239279):
Re: php_mysql.dll
239243 by: M. Sokolewicz
239279 by: João Cândido de Souza Neto
Re: Software shopping cart
239244 by: Ma Siva Kumar
string problem
239245 by: weetat
239248 by: Jay Blanchard
Re: [Full-disclosure] Postfix configuration
239246 by: nicolas figaro
sorry for the previous mail, mixed mailing list
239247 by: nicolas figaro
Re: Randomly rotate image on page load? File under: Image Manipulation
239249 by: Jay Blanchard
239255 by: tedd
239266 by: Micky Hulse
239268 by: Jay Blanchard
239269 by: Jay Blanchard
239270 by: Micky Hulse
239271 by: Micky Hulse
239278 by: tedd
Where is phpinfo getting this?
239250 by: Robert Hicks
239251 by: Brad Bonkoski
239252 by: Robert Hicks
239253 by: João Cândido de Souza Neto
239254 by: Ford, Mike
239259 by: Robert Hicks
Re: Chnage Management in PHP aka version control?
239256 by: tg-php.gryffyndevelopment.com
239257 by: Jochem Maas
parse error
239258 by: Schalk
239260 by: Jochem Maas
239261 by: Schalk
239262 by: Paul Novitski
possible IE problem
239263 by: Schalk
GD to database directly
239264 by: Peter Lauri
239265 by: Jay Blanchard
239272 by: Peter Lauri
239274 by: Austin Denyer
Re: [PHP-WIN] Dynamic HTML table sort with PHP
239267 by: Vandegrift, Ken
arrays
239273 by: Dallas Cahker
239275 by: Stut
239276 by: Brad Bonkoski
239277 by: Dallas Cahker
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
although not specifically mentioned anywhere, make sure that your
libmysql.dll file is *also* in the PATH of windows. If PHP misses that
lib, it will bail out with the error below aswell.
- tul
Bagus Nugroho wrote:
if windows, you may add php directory to the PATH of Windows [Environment
Variables].
________________________________
From: João Cândido de Souza Neto [mailto:[EMAIL PROTECTED]
Sent: Mon 10-Jul-2006 09:08
To: [email protected]
Subject: Re: [PHP] php_mysql.dll
Yes. I thik it's because windows set all folders by default as read only and
i can't change that.
"Chris" <[EMAIL PROTECTED]> escreveu na mensagem
news:[EMAIL PROTECTED]
João Cândido de Souza Neto wrote:
Excuse me.
PHP Warning: PHP Startup: Unable to load dynamic library
'./ext/php_mysql.dll' - The especified module was not found. in Unknown
on line 0
Thanks for the translation..
Does the php_mysql.dll file exist in the php/ext folder?
Note that mysql isn't enabled by default with php5. Read
http://www.php.net/mysql for information on how to set this up.
--
Postgresql & php tutorials
http://www.designmagick.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I add c:\php and c:\php\ext in path but nothing work.
I hate Mr. Bill Gates.
""M. Sokolewicz"" <[EMAIL PROTECTED]> escreveu na mensagem
news:[EMAIL PROTECTED]
> although not specifically mentioned anywhere, make sure that your
> libmysql.dll file is *also* in the PATH of windows. If PHP misses that
> lib, it will bail out with the error below aswell.
>
> - tul
>
> Bagus Nugroho wrote:
>> if windows, you may add php directory to the PATH of Windows [Environment
>> Variables].
>> ________________________________
>>
>> From: João Cândido de Souza Neto [mailto:[EMAIL PROTECTED]
>> Sent: Mon 10-Jul-2006 09:08
>> To: [email protected]
>> Subject: Re: [PHP] php_mysql.dll
>>
>>
>>
>> Yes. I thik it's because windows set all folders by default as read only
>> and
>> i can't change that.
>>
>> "Chris" <[EMAIL PROTECTED]> escreveu na mensagem
>> news:[EMAIL PROTECTED]
>>
>>>João Cândido de Souza Neto wrote:
>>>
>>>>Excuse me.
>>>>
>>>>PHP Warning: PHP Startup: Unable to load dynamic library
>>>>'./ext/php_mysql.dll' - The especified module was not found. in Unknown
>>>>on line 0
>>>
>>>Thanks for the translation..
>>>
>>>Does the php_mysql.dll file exist in the php/ext folder?
>>>
>>>Note that mysql isn't enabled by default with php5. Read
>>>http://www.php.net/mysql for information on how to set this up.
>>>
>>>--
>>>Postgresql & php tutorials
>>>http://www.designmagick.com/
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>>
>>
--- End Message ---
--- Begin Message ---
On Mon July 10 2006 2:59 pm, Ryan A wrote:
> Hey all,
>
> While on the subject of shopping carts, (and i didnt
> want to hijack the other thread) can anybody recommend
> a shopping cart that sells ( or: to sell) software
> rather than material goods?
>
Hi Ryan
OS Commerce does all that you are asking for.
http://www.oscommerce.com
It has options to set up various types of products/downloads and various
payment options (paypal, credit cards etc). It is easy to install and use.
Best regards,
Ma Sivakumar
--- End Message ---
--- Begin Message ---
Hi all ,
I am using PHP 4.3.2 , MYSQL database and Red Hat Entreprise OS.
I have the SQL statement which store in $str variable as shown below :
How to get the '%WS-X5225R%' from $str variable ?
$str = " SELECT DISTINCT(tbl_chassis.serial_no),tbl_card.card_model, ";
"tbl_chassis.host_name,tbl_chassis.chasis_model,tbl_chassis.country,";
"tbl_chassis.city,tbl_chassis.building,
"tbl_chassis.other,tbl_chassis.status,tbl_chassis.chasis_eos,tbl_chassis.chasis_eol,tbl_chassis.chasis_user_field_1,tbl_chassis.chasis_user_field_2,tbl_chassis.chasis_user_field_3"
"from tbl_chassis tbl_chassis,tbl_card tbl_card "
"WHERE tbl_chassis.serial_no = tbl_card.serial_no AND
tbl_card.card_model LIKE'%WS-X5225R%'";
thanks
--- End Message ---
--- Begin Message ---
[snip]
I have the SQL statement which store in $str variable as shown below
:
How to get the '%WS-X5225R%' from $str variable ?
$str = " SELECT DISTINCT(tbl_chassis.serial_no),tbl_card.card_model, ";
"tbl_chassis.host_name,tbl_chassis.chasis_model,tbl_chassis.country,";
"tbl_chassis.city,tbl_chassis.building,
"tbl_chassis.other,tbl_chassis.status,tbl_chassis.chasis_eos,tbl_chassis
.chasis_eol,tbl_chassis.chasis_user_field_1,tbl_chassis.chasis_user_fiel
d_2,tbl_chassis.chasis_user_field_3"
"from tbl_chassis tbl_chassis,tbl_card tbl_card "
"WHERE tbl_chassis.serial_no = tbl_card.serial_no AND
tbl_card.card_model LIKE'%WS-X5225R%'";
[/snip]
What do you mean " get the '%WS-X5225R%' from $str variable" ? Do you
want to be able to change that value?
--- End Message ---
--- Begin Message ---
Bartlomiej Szymanski a écrit :
Hello,
Hi
I have a problem with message delivery via Postfix. I build a network,
using VMware, consisting of three standalone FreeBSD machines.
I named them: FREEBSD1, FREEBSD2 and FREEBSD3.
do you know postfix has also a very good mailing list ?
On each of the machine I installed Postfix 2.2 and configured it.
Now I have a problem: when I am sending message from FREEBSD1 using
Postfix on FREEBSD2, I am getting the following error:
Jul 5 16:38:31 FREEBSD2 postfix/smtp[1059]: 7C1FEB0B2:
to=<[EMAIL PROTECTED]>, orig_to=<[EMAIL PROTECTED]>, relay=none,
delay=1, status=bounced (Host or domain name not found. Name service
error for name=FREEBSD1.FREEBSD2 type=A: Host not found)
I know, that some settings in main.cf are wrong, but I cannot find out.
I added the names and IPs to /etc/hosts. I can ping FREEBSD1 and so on.
In my opinion smth. wrong with relaying and domains/hostnames.
postfix tries to resolve FREEBSD1.FREEBSD2 using dns resolution. I don't
know if you can tell postfix to use /etc/hosts.
try to add the name of your machines to the DNS, or use FQDN (like
freebsd1.mynetwork.net).
with short hostnames (like freebsd1), postfix tries to add the hostname
of the server it's running on
to the mail extension.
postfix won't give you good results unless you have a dns server up and
running so you don't see messages like the one above
anymore.
If you have any ide just email me.
hope this'll help
N F
Regards,
Bartek Szymanski
--- End Message ---
--- Begin Message ---
/me really need some sleep ...
N F
--- End Message ---
--- Begin Message ---
[snip]
If you actually want to load a different image each time, start with
php.net/rand Perhaps the image names could be integer based, or you
could
oad the image paths into an array and use rand to select based on a
numeric
key. Or you could store the image paths in a mysql database and use
mysql's
RAND to select an image path for display.
The possibilities are endless, but seeing this is a php list I won't
mention
J...s....t :-)
[/snip]
Script That Shall Not Be Named!
Selecting a random image from a directory using only PHP is not
tremendously difficult;
/*random picture picker*/
define ("ALBUM", "the/place/where/pictures/are/kept");
$albumOpen = opendir(ALBUM);
while(FALSE !== ($pic = readdir($albumOpen))){
$picParts = explode(".", $pic);
if("jpg" === $picParts[1]){
$arrDisplayPic[] = $pic;
}
}
closedir($albumOpen);
$randImgIndex = rand(0, (count($arrDisplayPic)-1));
/* test for the image size and reformat if needed,
* in this case one 350 px wide
*/
$imgInfo = getimagesize(ALBUM.$arrDisplayPic[$randImgIndex]);
if("350" <= $imgInfo[0]){
echo "<img src=\"" . ALBUM.$arrDisplayPic[$randImgIndex] . "\"
width=\"350\" align=\"right\" hspace=\"10\" vspace=\"10\">";
} else {
echo "<img src=\"" . ALBUM.$arrDisplayPic[$randImgIndex] . "\"
align=\"right\" hspace=\"10\" vspace=\"10\">";
}
--- End Message ---
--- Begin Message ---
>That all depends on what you mean by image rotation. A bunch of folks
>define image rotation as displaying a set of images as a rotating "slide
>show" while others (like Chris) see it as rotating a single image on an
>axis (correct definition).
>
>--Paul
Correct definition?
Not as I see it. The first definition in the dictionary is seldom the only
"correct" definition.
What about "crop rotation" -- no axis there.
What about "heads of departments in rotation" -- no axis there either.
What about "she was completing a rotation in trauma surgery" -- nada on axis.
The point is that images, like any other object, can be rotated in terms of
axis OR in order of presentation. There is no one "correct" definition for
rotation of any object, excepting exotic particles and other such field
specific phenomena.
tedd
--
------------------------------------------------------------------------------------
http://sperling.com http://ancientstones.com http://earthstones.com
--- End Message ---
--- Begin Message ---
tedd wrote:
Not as I see it. The first definition in the dictionary is seldom the only
"correct" definition.
Good point...
Not to be contrary, but:
What about when you are speaking in terms of computers, and specifically
images? Seems like if the subject is "images on the computer",
"rotation" falls more closely to "rotating on an axis" and not "changing
of images".
For example, I was driving down the road the other day, and I saw
temporary road construction sign that said "Road Const ahead". Now, my
first thought was "Constant" as in C++. But, wait, this is not
programing, this is driving, and they must mean "Construction".
As a graphic designer maybe I have some bias... I when I use Photoshop I
do not think of Rotation as moving images from the front of the stack to
the back of the stack (if I have a bunch open)... Rotation clearly means
(in the PS world) rotating an image on an axis.
Now, in terms of a slide-show, rotation makes some sense, but IMHO I
think word is improperly used.
:)
Cheers,
Micky
--- End Message ---
--- Begin Message ---
[snip]
For example, I was driving down the road the other day, and I saw
temporary road construction sign that said "Road Const ahead". Now, my
first thought was "Constant" as in C++. But, wait, this is not
programing, this is driving, and they must mean "Construction".
[/snip]
The other day I saw a temporary road construction sign that said "Slow
Men Working" and it gave me pause....
The word 'rotation' is being improperly used, because when one swaps
images he or she does not turn them on their sides, unless one wishes
to. Image swapping is a much better term, but not really....as swapping
would indicate a trade of some sort Replacement is about as good as
swap. Do you pre-heat your oven?
This is exactly why one should always comment their code.
--- End Message ---
--- Begin Message ---
[snip]
Jay Blanchard wrote:
> The other day I saw a temporary road construction sign that said "Slow
> Men Working" and it gave me pause....
Reminds me of:
"Do you come from a land down under?
Where women glow and men plunder?
Can't you hear, can't you hear the thunder?
You better run, you better take cover."
> The word 'rotation' is being improperly used, because when one swaps
> images he or she does not turn them on their sides, unless one wishes
> to. Image swapping is a much better term, but not really....
For sure. "Photo Slideshow" or just "Slideshow" makes the most sense to
me.
[/snip]
While we are splitting hairs, slideshow would only be applicable if the
images continued to change without page reloading.
--- End Message ---
--- Begin Message ---
Jay Blanchard wrote:
While we are splitting hairs, slideshow would only be applicable if the
images continued to change without page reloading.
LOL, good point! Hehee.
--- End Message ---
--- Begin Message ---
Jay Blanchard wrote:
The other day I saw a temporary road construction sign that said "Slow
Men Working" and it gave me pause....
Reminds me of:
"Do you come from a land down under?
Where women glow and men plunder?
Can't you hear, can't you hear the thunder?
You better run, you better take cover."
The word 'rotation' is being improperly used, because when one swaps
images he or she does not turn them on their sides, unless one wishes
to. Image swapping is a much better term, but not really....
For sure. "Photo Slideshow" or just "Slideshow" makes the most sense to me.
--- End Message ---
--- Begin Message ---
At 1:52 PM -0500 7/10/06, Jay Blanchard wrote:
>For sure. "Photo Slideshow" or just "Slideshow" makes the most sense to
>me.
>[/snip]
>
>While we are splitting hairs, slideshow would only be applicable if the
>images continued to change without page reloading.
I'll continue to split hairs.
As anyone who has given a "talk/presentation with slides" knows, a slide-show
came originally via a slide-projector wherein individual "slides" where loaded
into, and out-of, the slide-projector (i.e., refresh). So, a slide-show would
only be applicable if the images were loaded in a complete refresh manner.
One could even say that the slides were rotated. :-)
tedd
--
------------------------------------------------------------------------------------
http://sperling.com http://ancientstones.com http://earthstones.com
--- End Message ---
--- Begin Message ---
include_path .;C:\php5\pear .;C:\php5\pear
I have PHP5 sure but it is in C:\PHP. I have looked in my ENV and I have
scoured the registry and nothing comes up for "php5". So where is it
getting this entry?
:Robert
--- End Message ---
--- Begin Message ---
Check your include_path in your php.ini file.
-Brad
Robert Hicks wrote:
include_path .;C:\php5\pear .;C:\php5\pear
I have PHP5 sure but it is in C:\PHP. I have looked in my ENV and I
have scoured the registry and nothing comes up for "php5". So where is
it getting this entry?
:Robert
--- End Message ---
--- Begin Message ---
I should have mentioned that in my first post. I did check the PHP.INI
file and it is not in there (nor is there a mention of php5 in it).
:Robert
Brad Bonkoski wrote:
Check your include_path in your php.ini file.
-Brad
Robert Hicks wrote:
include_path .;C:\php5\pear .;C:\php5\pear
I have PHP5 sure but it is in C:\PHP. I have looked in my ENV and I
have scoured the registry and nothing comes up for "php5". So where is
it getting this entry?
:Robert
--- End Message ---
--- Begin Message ---
I found something like this too.
If you set your extension_dir to "" you´ll see that php will search the
dynamic libraries in c:\php5.
"Robert Hicks" <[EMAIL PROTECTED]> escreveu na mensagem
news:[EMAIL PROTECTED]
> include_path .;C:\php5\pear .;C:\php5\pear
>
> I have PHP5 sure but it is in C:\PHP. I have looked in my ENV and I have
> scoured the registry and nothing comes up for "php5". So where is it
> getting this entry?
>
> :Robert
--- End Message ---
--- Begin Message ---
On 10 July 2006 14:29, Robert Hicks wrote:
> I should have mentioned that in my first post. I did check
> the PHP.INI
> file and it is not in there (nor is there a mention of php5 in it).
>
> > Robert
>
> Brad Bonkoski wrote:
> > Check your include_path in your php.ini file.
> > -Brad
> >
> > Robert Hicks wrote:
> >
> > > include_path .;C:\php5\pear .;C:\php5\pear
> > >
> > > I have PHP5 sure but it is in C:\PHP. I have looked in my ENV and
> > > I have scoured the registry and nothing comes up for "php5". So
> > > where is it getting this entry?
Where, exactly, does phpinfo say PHP is looking for your php.ini file? Becasue
this include_path value looks like it might be the default you get when PHP
can't find a php.ini at all.
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS, LS6 3QS, United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
To view the terms under which this email is distributed, please go to
http://disclaimer.leedsmet.ac.uk/email.htm
--- End Message ---
--- Begin Message ---
Okay, that is just plain wrong!
Thanks though. :-)
:Robert
João Cândido de Souza Neto wrote:
I found something like this too.
If you set your extension_dir to "" you´ll see that php will search the
dynamic libraries in c:\php5.
"Robert Hicks" <[EMAIL PROTECTED]> escreveu na mensagem
news:[EMAIL PROTECTED]
include_path .;C:\php5\pear .;C:\php5\pear
I have PHP5 sure but it is in C:\PHP. I have looked in my ENV and I have
scoured the registry and nothing comes up for "php5". So where is it
getting this entry?
:Robert
--- End Message ---
--- Begin Message ---
Well, I had similar problems at a previous job with SourceSafe as I'm having
with CVS. I totally "get" and understand the concept of these systems, but
they're still overly headachey to use. Maybe I DONT really get them. hah. I
understand mostly how they work and the concept but it seems like another case
of "we don't need to make it easier because the people who use this are highly
technical and they'll figure it out". Or as the gaming community might say
"lrn2configure noob!"
For now, CVS works fine for us. But it still feels like we're using a go-cart
with no engine. If we push it to the top of the hill, we can coast down the
other side and even steer and stop if we want... but it feels incomplete usage
and functionality-wise.
Oh well, project for another day. Thanks for the input!
-TG
= = = Original message = = =
On Wed, July 5, 2006 10:40 am, [EMAIL PROTECTED] wrote:
> I don't know about you, Jay, but all we really want to do is keep a
> record of revisions and be able to 'diff' between them and have the
> files lock so if someone tries to open the file and it's already open,
> that the user is alerted and allowed to open read-only if they desire.
I *much* prefer the CVS/subversion paradigm of concurrent changes, but
if the above is what you want, perhaps you should look into
SourceSafe.
NOTE:
SourceSafe in the 80s on Mac PPC *ate* two of my projects when
goofballs added ".doc" files as text.
I'll never ever ever use this product again, no matter how many people
tell me it's been fixed.
YMMV
___________________________________________________________
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.
--- End Message ---
--- Begin Message ---
[EMAIL PROTECTED] wrote:
> Well, I had similar problems at a previous job with SourceSafe as I'm having
> with CVS. I totally "get" and understand the concept of these systems, but
> they're still overly headachey to use. Maybe I DONT really get them. hah. I
> understand mostly how they work and the concept but it seems like another
> case of "we don't need to make it easier because the people who use this are
> highly technical and they'll figure it out". Or as the gaming community
> might say "lrn2configure noob!"
>
> For now, CVS works fine for us. But it still feels like we're using a
> go-cart with no engine. If we push it to the top of the hill, we can coast
> down the other side and even steer and stop if we want... but it feels
> incomplete usage and functionality-wise.
>
$> cvs -q crowbar
or
$> cvs -q magicwand
or
$> cvs -q dowhatimean
unfortunately that's only in my imagination :-P
> Oh well, project for another day. Thanks for the input!
>
> -TG
>
> = = = Original message = = =
>
> On Wed, July 5, 2006 10:40 am, [EMAIL PROTECTED] wrote:
>> I don't know about you, Jay, but all we really want to do is keep a
>> record of revisions and be able to 'diff' between them and have the
>> files lock so if someone tries to open the file and it's already open,
>> that the user is alerted and allowed to open read-only if they desire.
>
> I *much* prefer the CVS/subversion paradigm of concurrent changes, but
> if the above is what you want, perhaps you should look into
> SourceSafe.
>
> NOTE:
> SourceSafe in the 80s on Mac PPC *ate* two of my projects when
> goofballs added ".doc" files as text.
>
> I'll never ever ever use this product again, no matter how many people
> tell me it's been fixed.
>
> YMMV
>
>
> ___________________________________________________________
> Sent by ePrompter, the premier email notification software.
> Free download at http://www.ePrompter.com.
>
--- End Message ---
--- Begin Message ---
Greetings All,
Please have a look at the following code:
if ($numrows < 1)
// the member does not exist
{
include ($adminfolderpath."/include/headeradmin.php");
echo "<p>That email does not exist in the members list.</p>";
echo "<p><a href='login.php'>Please login</a>.</p>";
include ($adminfolderpath."/include/footeradmin.php");
exit;
}
if (md5($memberpassword) !=$dbmemberpassword)
// the password does not match the one in the database
{
include ($adminfolderpath."/include/headeradmin.php");
echo "<p>Incorrect password, please try again.</p>";
login();
include ($adminfolderpath."/include/footeradmin.php");
exit;
} else {
header("Location:
http://demo.bdiverse.com/accessible/admin/listmypages.php");
exit;
}
?>
I am getting the following error:* Parse error*: parse error, unexpected
$ in
*/home/httpd/vhosts/demo.bdiverse.com/httpdocs/accessible/processlogin.php*
on line *69
In my code the last line i.e. ?> is marked as line 69
Can someone please let me know what is causing this error? Thanks!
*
--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Business.Solution.Developers
--- End Message ---
--- Begin Message ---
Schalk wrote:
> Greetings All,
>
> Please have a look at the following code:
>
your missing a closing brace some where - by the looks of things
not in the code you sent.
> if ($numrows < 1)
> // the member does not exist
> {
> include ($adminfolderpath."/include/headeradmin.php");
> echo "<p>That email does not exist in the members list.</p>";
> echo "<p><a href='login.php'>Please login</a>.</p>";
> include ($adminfolderpath."/include/footeradmin.php");
> exit;
> }
>
> if (md5($memberpassword) !=$dbmemberpassword)
> // the password does not match the one in the database
> {
> include ($adminfolderpath."/include/headeradmin.php");
> echo "<p>Incorrect password, please try again.</p>";
> login();
> include ($adminfolderpath."/include/footeradmin.php");
> exit;
> } else {
> header("Location:
> http://demo.bdiverse.com/accessible/admin/listmypages.php");
> exit; }
> ?>
>
> I am getting the following error:* Parse error*: parse error, unexpected
> $ in
> */home/httpd/vhosts/demo.bdiverse.com/httpdocs/accessible/processlogin.php*
> on line *69
>
> In my code the last line i.e. ?> is marked as line 69
>
> Can someone please let me know what is causing this error? Thanks!
> *
>
--- End Message ---
--- Begin Message ---
Thanks everyone.
Jochem Maas wrote:
Schalk wrote:
Greetings All,
Please have a look at the following code:
your missing a closing brace some where - by the looks of things
not in the code you sent.
if ($numrows < 1)
// the member does not exist
{
include ($adminfolderpath."/include/headeradmin.php");
echo "<p>That email does not exist in the members list.</p>";
echo "<p><a href='login.php'>Please login</a>.</p>";
include ($adminfolderpath."/include/footeradmin.php");
exit;
}
if (md5($memberpassword) !=$dbmemberpassword)
// the password does not match the one in the database
{
include ($adminfolderpath."/include/headeradmin.php");
echo "<p>Incorrect password, please try again.</p>";
login();
include ($adminfolderpath."/include/footeradmin.php");
exit;
} else {
header("Location:
http://demo.bdiverse.com/accessible/admin/listmypages.php");
exit; }
?>
I am getting the following error:* Parse error*: parse error, unexpected
$ in
*/home/httpd/vhosts/demo.bdiverse.com/httpdocs/accessible/processlogin.php*
on line *69
In my code the last line i.e. ?> is marked as line 69
Can someone please let me know what is causing this error? Thanks!
*
--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Business.Solution.Developers
--- End Message ---
--- Begin Message ---
At 08:11 AM 7/10/2006, Schalk wrote:
I am getting the following error:* Parse error*: parse error,
unexpected $ in
*/home/httpd/vhosts/demo.bdiverse.com/httpdocs/accessible/processlogin.php*
on line *69
In my code the last line i.e. ?> is marked as line 69
I don't see anything wrong with the code you posted, so I'd look
earlier in your script or in your included scripts. Generally
speaking when the parser complains at the final ?> tag it means a
missing close-bracket } at the end of a code block or a heredoc
expression that isn't closed properly. If you're using heredocs,
remember that the closing expression must end in a semicolon and
neither the the opening expression nor the closing may have trailing
spaces or tabs.
Good luck,
Paul
--- End Message ---
--- Begin Message ---
Greetings All,
Now that the parse error is fixed the login script works fine in FF but
in IE it does not do the redirect. Is there a reason why this code may
not work in IE? Is there a better way to do this?
$_SESSION['email'] = $email;
$_SESSION['memberpassword'] = md5($memberpassword);
header("Location:
http://demo.bdiverse.com/accessible/admin/listmypages.php");
exit;
Thanks!
--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Business.Solution.Developers
--- End Message ---
--- Begin Message ---
Best group member,
I am creating images via GD and want to save them to the database. Right now
I save them to the disk and then save them to the database. Is it possible
to write them directly to the database and skip the middle step where I
temporary write it to the hard disk?
Best regards,
Peter Lauri
--- End Message ---
--- Begin Message ---
[snip]
I am creating images via GD and want to save them to the database. Right
now
I save them to the disk and then save them to the database. Is it
possible
to write them directly to the database and skip the middle step where I
temporary write it to the hard disk?
[/snip]
1. Do not store images in a database, it is just a bad idea from a
performance perspective (as has been covered many times heretofore).
2. If you insist on storing the image in a database you can use any of
the image output functions, for instance;
INSERT INTO `table` (`picture`)
VALUE ('".imagegd($resource, 'imagename')."')
--- End Message ---
--- Begin Message ---
[snip]
1. Do not store images in a database, it is just a bad idea from a
performance perspective (as has been covered many times heretofore).
[/snip]
Is that really the case? Is this not depending on the application? :) My
application will never grow, and I can easily just change the file storage
procedure by changing in my file storage class if a change will be
necessary.
/Peter
--- End Message ---
--- Begin Message ---
Peter Lauri wrote:
>
> [snip]
> 1. Do not store images in a database, it is just a bad idea from a
> performance perspective (as has been covered many times heretofore).
> [/snip]
>
> Is that really the case? Is this not depending on the application? :) My
> application will never grow, and I can easily just change the file storage
> procedure by changing in my file storage class if a change will be
> necessary.
It is generally accepted that storing things like that in a database is
a Bad Thing. Much better to store the images as files and store the
path in the database.
Regards,
Austin.
signature.asc
Description: OpenPGP digital signature
--- End Message ---
--- Begin Message ---
Thanks for the reply - I will definitely look at the link you provided!
I currently did get this working smoothly in pure PHP, but this
obviously creates more overhead and a query is run on the DB everytime a
column is clicked to get the sorted data back. This is for an internal
app. that likely will not make extensive use of the sort though.
Thanks!
Ken Vandegrift
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
Web Administrator
Sharis Mgmt. Corp
________________________________
From: Shafiq Rehman [mailto:[EMAIL PROTECTED]
Sent: Sunday, July 09, 2006 10:09 PM
To: Vandegrift, Ken
Cc: [EMAIL PROTECTED]; [email protected]
Subject: Re: [PHP] RE: [PHP-WIN] Dynamic HTML table sort with PHP
Hello,
Why not you use the javascript to sort any column on client side.
http://www.kryogenix.org/code/browser/sorttable/
1. include the js file in your page
2. give your table an id
3. put your table in the class the code looks for.
That's it. Sortable clientside tables! Example:
http://pkfinance.info/analysis/
Hope this will help!
Regards
Shafiq Rehman
Sr. Web Engineer
http://www.phpgurru.com
--- End Message ---
--- Begin Message ---
Banging my head against a wall with arrays, maybe someone can help me with
the answer.
I have a db query that returns results from 1-100 or more.
I want to put the results into an array and pull them out elsewhere.
I want them to be pulled out in an orderly and expected fashion.
part of function
$sql="Select * FROM blah Where blahid='1'";
run sql
while ($row=mysql_fetch_array($result)) {
$oarray=array('blah1' => $row['lah1'], 'blah2' => $row['lah2'], 'blah3' =>
$row['lah3']);
}
return $oarray
part of display
$OLength=count($oarray);
for ($i = 0; $i < $OLength; $i++){
echo "O1 : ".$oarray['blah1'][$i]."<br>";
echo "O2 : ".$oarray['blah2'][$i]."<br>";
echo "O3 : ".$oarray['blah3'][$i]."<br>";
}
this gets me nothing, and I am unsure where I am going wrong, other then all
over the place.
--- End Message ---
--- Begin Message ---
Dallas Cahker wrote:
Banging my head against a wall with arrays, maybe someone can help me with
the answer.
I have a db query that returns results from 1-100 or more.
I want to put the results into an array and pull them out elsewhere.
I want them to be pulled out in an orderly and expected fashion.
part of function
$sql="Select * FROM blah Where blahid='1'";
run sql
while ($row=mysql_fetch_array($result)) {
$oarray=array('blah1' => $row['lah1'], 'blah2' => $row['lah2'], 'blah3' =>
$row['lah3']);
The above line will not add an array element per row. Change $oarray= to
$oarray[]=
}
return $oarray
part of display
$OLength=count($oarray);
for ($i = 0; $i < $OLength; $i++){
echo "O1 : ".$oarray['blah1'][$i]."<br>";
echo "O2 : ".$oarray['blah2'][$i]."<br>";
echo "O3 : ".$oarray['blah3'][$i]."<br>";
}
This is not the way the array is arranged. Switch your indices around so
it's like so...
echo "O1 : ".$oarray[$i]['blah1']."<br>";
echo "O2 : ".$oarray[$i]['blah2']."<br>";
echo "O3 : ".$oarray[$i]['blah3']."<br>";
this gets me nothing, and I am unsure where I am going wrong, other then
all
over the place.
-Stut
--- End Message ---
--- Begin Message ---
When loading the array you will only ever get the last record returned...
so count($oarray) will always be 1?
Perhaps something like this:
Function....
$sql = "...";
$ret = array();
while($row = mysql_feth_array($reault)) {
array_push($ret, $row);
}
return $ret;
then...
$data = function();
$c = count($data);
for($i=0; $i<$c; $i++) {
$row = $data[$i];
print_r($row);
}
Should give you what you want...
As for your "orderly" fashion, I would put this load on the database,
and not really PHP...
if you want to make it associate you can...just push the assocative onto
another array so you get the complete set...
-B
Dallas Cahker wrote:
Banging my head against a wall with arrays, maybe someone can help me
with
the answer.
I have a db query that returns results from 1-100 or more.
I want to put the results into an array and pull them out elsewhere.
I want them to be pulled out in an orderly and expected fashion.
part of function
$sql="Select * FROM blah Where blahid='1'";
run sql
while ($row=mysql_fetch_array($result)) {
$oarray=array('blah1' => $row['lah1'], 'blah2' => $row['lah2'],
'blah3' =>
$row['lah3']);
}
return $oarray
part of display
$OLength=count($oarray);
for ($i = 0; $i < $OLength; $i++){
echo "O1 : ".$oarray['blah1'][$i]."<br>";
echo "O2 : ".$oarray['blah2'][$i]."<br>";
echo "O3 : ".$oarray['blah3'][$i]."<br>";
}
this gets me nothing, and I am unsure where I am going wrong, other
then all
over the place.
--- End Message ---
--- Begin Message ---
Both work great.
Thanks
On 7/10/06, Brad Bonkoski <[EMAIL PROTECTED]> wrote:
When loading the array you will only ever get the last record returned...
so count($oarray) will always be 1?
Perhaps something like this:
Function....
$sql = "...";
$ret = array();
while($row = mysql_feth_array($reault)) {
array_push($ret, $row);
}
return $ret;
then...
$data = function();
$c = count($data);
for($i=0; $i<$c; $i++) {
$row = $data[$i];
print_r($row);
}
Should give you what you want...
As for your "orderly" fashion, I would put this load on the database,
and not really PHP...
if you want to make it associate you can...just push the assocative onto
another array so you get the complete set...
-B
Dallas Cahker wrote:
> Banging my head against a wall with arrays, maybe someone can help me
> with
> the answer.
>
> I have a db query that returns results from 1-100 or more.
> I want to put the results into an array and pull them out elsewhere.
> I want them to be pulled out in an orderly and expected fashion.
>
> part of function
>
> $sql="Select * FROM blah Where blahid='1'";
> run sql
> while ($row=mysql_fetch_array($result)) {
> $oarray=array('blah1' => $row['lah1'], 'blah2' => $row['lah2'],
> 'blah3' =>
> $row['lah3']);
> }
> return $oarray
>
>
> part of display
>
> $OLength=count($oarray);
>
> for ($i = 0; $i < $OLength; $i++){
> echo "O1 : ".$oarray['blah1'][$i]."<br>";
> echo "O2 : ".$oarray['blah2'][$i]."<br>";
> echo "O3 : ".$oarray['blah3'][$i]."<br>";
> }
>
> this gets me nothing, and I am unsure where I am going wrong, other
> then all
> over the place.
>
--- End Message ---