Freelancers Network
 
skill list top cap
Homepage
Join the Freelancer's Network
Update your details
Find a freelancer
Post a project
Find a project
Projects Archive
Post a job
Find a job
Jobs Archive
See Dan's Pages
See Andy's Pages
Link to this site
Resources
Join/Leave Forum
Forum Messages
+Additions+ Adverts
Advertising
Contact Us
Subscribe to our newsletter - enter your email address and hit return
Freelancers.net is owned and operated by Andy Stowell and Dan Winchester
skill list end cap
guru web hostcom

Find me again on Freelancers.net

RE: FN-FORUM PHP Problem - Only Simple

date posted 21st June 2002 22:45

> Also, if you're variables
> are sequentially numbered you might be better of using the
> above method with a loop to check and compensate for magic
> quotes rather than doing each one manually!

No in this case there was some randomness to the letter number
combinations - thanks for the tips though - I've only been working with
php/mySQL for about 3 weeks now (I'm from an ASP/M$ SQL server
background)

regards

Andrew Mottershead
Web Developer
Mindstream Web Design

email: [EMAIL REMOVED]
tel: +44 (0)1743 718262
fax: +44 (0) 7092 115513
web: www.mindstream.co.uk

This e-mail, and any attachment, is confidential. If you have received
it in error, please delete it from your system, do not use or disclose
the information in any way, and notify me immediately.



> -----Original Message-----
> From: [EMAIL REMOVED]
> [EMAIL REMOVED] On Behalf Of Steve Webster
> Sent: 21 June 2002 21:17
> To: [EMAIL REMOVED]
> Subject: Re: FN-FORUM PHP Problem - Only Simple
>
>
> Erm....yeah!
>
> If you want your scripts to be compatible across the board
> though, you'll have to use...
>
> extract($HTTP_POST_VARS);
>
> ...as versions of PHP prior to 4.2.0 don't support the new
> associative arrays ($_POST etc). Also, if you're variables
> are sequentially numbered you might be better of using the
> above method with a loop to check and compensate for magic
> quotes rather than doing each one manually! Something like...
>
> $base = 'a';
>
> for ($count = 1; $count $varName = $base . $count;
> $$varName = get_matic_quotes_gpc() ?
> $HTTP_POST_VARS['Fac_A'] : addslashes($HTTP_POST_VARS['Fac_A']);
> }
>

>
> Regards,
>
> Steve
>
> ----- Original Message -----
> From: "Andrew Mottershead" [EMAIL REMOVED]
> To: [EMAIL REMOVED]
> Sent: Friday, June 21, 2002 6:44 PM
> Subject: RE: FN-FORUM PHP Problem - Only Simple
>
>
> extract($_POST);!!
>
> Does that mean that I've just wasted the last hour typing this....
>
>
> if (isset($HTTP_POST_VARS['Fac_A']))
> {
> $a1 = (get_magic_quotes_gpc()) ? $HTTP_POST_VARS['Fac_A'] :
> addslashes($HTTP_POST_VARS['Fac_A']);
>
>
> Over and over again from $a1 to $a255!!!
>
>
> regards
>
> Andrew Mottershead
> Web Developer
> Mindstream Web Design
>
> email: [EMAIL REMOVED]
> tel: +44 (0)1743 718262
> fax: +44 (0) 7092 115513
> web: www.mindstream.co.uk
>
> This e-mail, and any attachment, is confidential. If you have
> received it in error, please delete it from your system, do
> not use or disclose the information in any way, and notify me
> immediately.
>
>
> -----Original Message-----
> From: [EMAIL REMOVED]
> [EMAIL REMOVED] On Behalf Of Steve Webster
> Sent: 21 June 2002 18:23
> To: [EMAIL REMOVED]
> Subject: Re: FN-FORUM PHP Problem - Only Simple
>
>
> Hi Darren,
>
> If you're using PHP 4.2.0 upwards in it's default
> configuration then environment and server variables, along
> with GTE POST and cookie data, are no longer automatically
> created as global variables. This is thanks to the
> register_globals setting in the php.ini file, which needs to
> be set to 'on'. Alternatively, if you don't have access to
> the PHP configuration then you can try adding the following
> to the beginning of your scripts...
>
> extract($_SERVER);
> extract($_ENV);
> extract($_GET);
> extract($_POST);
> extract($_COOKIE);
>
> If that seems a little dratic, then just change the section
> that outputs HTTP_REFERER to...
>
>
>
> I hope this helps!
>
> Regards,
>
> Steve
>
> ----- Original Message -----
> From: Darren
> To: [EMAIL REMOVED]
> Sent: Friday, June 21, 2002 6:13 PM
> Subject: FN-FORUM PHP Problem - Only Simple
>
>
> I know this is simple but why does it keep bringing back an Undefined
> variable: HTTP_REFERER. Can some one please help with this.
>
>
> Applied theme,



Messages by Day
June 30th 2002
June 29th 2002
June 28th 2002
June 27th 2002
June 26th 2002
June 25th 2002
June 24th 2002
June 23rd 2002
June 22nd 2002
June 21st 2002
June 20th 2002
June 19th 2002
June 18th 2002
June 17th 2002
June 16th 2002
June 15th 2002
June 14th 2002
June 13th 2002
June 12th 2002
June 11th 2002
June 10th 2002
June 9th 2002
June 8th 2002
June 7th 2002
June 6th 2002
June 5th 2002
June 4th 2002
June 3rd 2002
June 2nd 2002
June 1st 2002


Messages by Month
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002


Messages by Year
2008
2007
2006
2005
2004
2003
2002
2001
2000