ltwCalendar
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsProjectsltwCalendar

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old June 11th, 2003, 03:50 AM
crash3909 crash3909 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 34 crash3909 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
Send a message via Yahoo to crash3909
Calendar needs stripslashes

Hi,

I just got the calendar that I downloaded from this site to work, but the variable *$eName* needs stripslashes. I entered something in there that had an apostrophe, but those evil slashes appeared.

I tried *$eName = stripslashes($eName);* in a bunch of places in the *ltw_classes.php* and it just laughed at me. Where can I put this code?

Thanks

Reply With Quote
  #2  
Old June 16th, 2003, 03:58 AM
crash3909 crash3909 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 34 crash3909 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
Send a message via Yahoo to crash3909
RE: Calendar needs stripslashes

Hi,

Just curious if anyone has a way to get rid of the slashes that I described in the above posting. Thanks for your help.

Reply With Quote
  #3  
Old June 16th, 2003, 03:12 PM
Hatcher Hatcher is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Yarm, Cleveland, England
Posts: 395 Hatcher User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
Send a message via AIM to Hatcher Send a message via Yahoo to Hatcher
RE: Calendar needs stripslashes

pssst dont let anyone know i told you ...

COUGH

$ename = $_POST['ename'];
$ename = stripslashes($ename);


Just put them at the top

END OF COUGH

Reply With Quote
  #4  
Old June 16th, 2003, 03:29 PM
jorgen jorgen is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Hardenberg, Holland<marquee>
Posts: 284 jorgen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: Calendar needs stripslashes

I always use this function so I never have to stripslashes.
First of all you have to ensure magic_quotes_gpc is turned of.
you can use the ini_set() function for that task

php Code:
Original - php Code
  1.  
  2. /**
  3. *  Apply magic quotes
  4. *
  5. *  @access public
  6. *  @param  array|string  The input variable
  7. *  @return void
  8. */
  9. function apply_magic_quotes(&$arr)
  10. {
  11.   if (!ini_get('magic_quotes_gpc')) {
  12.     if (is_array($arr)) {
  13.       $c = sizeOf($arr);
  14.       $a = array_keys($arr);
  15.       for ($i = 0; $i < $c; $i++) {
  16.         if (is_array($arr[$a[$i]])) {
  17.           apply_magic_quotes($arr[$a[$i]]);
  18.         } else {
  19.           $arr[$a[$i]] = str_replace(""", """, ($arr[$a[$i]]));
  20.           $arr[$a[$i]] = str_replace("'", "'", ($arr[$a[$i]]));
  21.         }
  22.       }
  23.     } elseif (!is_string($arr)) {
  24.       $arr = str_replace(""", """, $arr);
  25.       $arr = str_replace("'", "'", $arr);
  26.     }
  27.   }
  28. }

Reply With Quote
  #5  
Old June 16th, 2003, 04:14 PM
crash3909 crash3909 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 34 crash3909 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
Send a message via Yahoo to crash3909
RE: Calendar needs stripslashes

Hey Hatcher,

I tried what you said not to tell anyone you told me, but it came up empty. The slashes are still there. Any other ideas? I promise not to tell anyone. Thanks again.

Reply With Quote
  #6  
Old June 16th, 2003, 06:21 PM
Hatcher Hatcher is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Yarm, Cleveland, England
Posts: 395 Hatcher User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
Send a message via AIM to Hatcher Send a message via Yahoo to Hatcher
RE: Calendar needs stripslashes

this would be easier with the whole code, hmmmcontact me on aim or email me(hatcher@hatcher.depot-network.com) and send me the whole code, ill see what i can do!

Reply With Quote
Reply

Viewing: Codewalkers ForumsProjectsltwCalendar > Calendar needs stripslashes


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

Request Your Free Technology Downloads!
 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

Request Your Free Technology Downloads!
 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

Request Your Free Technology Downloads!
 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

Request Your Free Technology Downloads!
 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek