Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4613050
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:29:27+00:00 2026-05-22T01:29:27+00:00

http://php.about.com/od/finishedphp1/ss/php_login_code_4.htm I am really confused about three particular lines of code in this tutorial

  • 0

http://php.about.com/od/finishedphp1/ss/php_login_code_4.htm

I am really confused about three particular lines of code in this tutorial to create a login page and databse, on the page I have listed above.

if (!get_magic_quotes_gpc()) {

        $_POST['email'] = addslashes($_POST['email']);

    }

Why is she fiddling with the $_POST[’email’] value, when it isn’t even in an input box?

EDIT:

I still cannot find an input box for email, I have even copied and pasted the entire site. I still can’t find one box that says email.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T01:29:28+00:00Added an answer on May 22, 2026 at 1:29 am

    First, it doesn’t matter where the content comes from on the page. Any user-submitted content (i.e. anything in the $_GET, $_POST or $_COOKIE superglobals) should be treated as unsafe. Don’t presume that the only way a user can submit evil content is by typing it into a textbox.

    Second, this code is, IMO, dumb. It basically says “if magic quotes are off, do what they’d have done if they were on, by adding slashes to avoid SQL injection”. It’s the lazy way to make your code work. The proper way is to build your code so that magic quotes are unnecessary, by using parametrized queries (e.g. using PDO or mySqli).

    Basically, from that line of code, you can tell enough to know that you shouldn’t trust the rest of it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

5 star rating script I have is made based on this tutorial http://php.about.com/od/finishedphp1/ss/rating_script.htm I
Excerpt from http://php.about.com/od/advancedphp/ss/php_sessions.htm : So how will it know it's me? Most sessions set
Working on this page: http://www.karlsenner.dreamhosters.com/about.php and having trouble with the navigation in IE6. It
In this video: http://www.facebook.com/video/video.php?v=596368660334 Facebook talks about their implementation of Haste -- a CSS
My php is weak and I'm trying to change this string: http://www.example.com/backend.php?/c=crud&m=index&t=care ^ to
I am using these rules and conditions in .htaccess to turn these http://www.example.com/index.php/about/history http://www.example.com/about/history/index.php
How can I transform: http://example.com/about.php http://example.com/hello/deep.php http://example.com/hello/world/deeper.php Dynamically, into URLs like: http://example.com/about/ http://example.com/hello/deep/ http://example.com/hello/world/deeper/
This is what my browser sent, when logging into some site: POST http://www.some.site/login.php HTTP/1.0
This PHP code... 207 if (getenv(HTTP_X_FORWARDED_FOR)) { 208 $ip = getenv('HTTP_X_FORWARD_FOR'); 209 $host =
In today's news, the official twitter widget (http://twitter.com/about/resources/widgets) destroyed my footer completely. And I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.