+ Reply to Thread
Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: SQL Injection?

  1. #11
    batman1's Avatar
    batman1 is offline x10Hosting Member batman1 is an unknown quantity at this point
    Join Date
    Aug 2008
    Location
    Jamaica
    Posts
    92

    Re: SQL Injection?

    Is that the entire page? From what i am seeing once you hit that page an email will be sent.

    + I dont see the use of an SQL there.

  2. #12
    focus is offline x10 Sophmore focus is an unknown quantity at this point
    Join Date
    Feb 2008
    Posts
    112

    Re: SQL Injection?

    Quote Originally Posted by batman1 View Post
    Is that the entire page? From what i am seeing once you hit that page an email will be sent.

    + I dont see the use of an SQL there.
    Apologies for the misleading title.



    Misson if i was to use a captcha i would need to change the ordering pages to .php and since theres alot of pages it would seem that the website would be half .html and half .php. Would it best to change the whole website to use .php extention or doesn't it really matter?

  3. #13
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: SQL Injection?

    Just change the files that must have dynamic content to PHP; leave those with static content alone. If you're concerned about appearance, you can support extensionless URLs with either content negotiation:
    Code:
    Options +MultiViews
    or rewriting:
    Code:
    RewriteEngine On
    
    RewriteRule \.(php|s?html)([/?#].*)?$ - [L]
    
    RewriteCond %{REQUEST_FILENAME}.php -f
    RewriteRule ^/?(.*[^/])/?$    $1.php [L]
    
    RewriteCond %{REQUEST_FILENAME}.shtml -f
    RewriteRule ^/?(.*[^/])/?$    $1.shtml [L]
    
    RewriteCond %{REQUEST_FILENAME}.html -f
    RewriteRule ^/?(.*[^/])/?$    $1.html [L]
    Both make it easy to make readable public URLs.

    With a well designed site, you only need a single script to generate the various order pages. This is a major advantage of using scripts: you only need to write a few scripts that generate all the site's pages.
    Last edited by misson; 05-27-2010 at 02:42 AM.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  4. #14
    focus is offline x10 Sophmore focus is an unknown quantity at this point
    Join Date
    Feb 2008
    Posts
    112

    Re: SQL Injection?

    Am i able to link the pages as below?

    HTML_Form (Java Validated) -- > captcha.php --> Form gets sent to Mail --> Success_Message_For_User.php


    At the moment i have form.html and formsend.php

    What i'm trying to do is to keep the html form pages which include javascript and add a captcha before an email is sent...


    From what i've seen so far the captcha usually goes on the form.html which should be changed to form.php. I want to know it i can put it in between as it would save me from re-editing the whole website.
    Last edited by focus; 05-27-2010 at 07:51 AM.

  5. #15
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: SQL Injection?

    While adding the captcha as a separate page would make it easier for you, it will make the process clunkier for your users. Your users should come first.

    You don't need to rewrite every page, since you don't need a page for every product. One script can cover the order form, and another for product info.

    Quote Originally Posted by focus View Post
    HTML_Form (Java Validated)
    Do you mean javascript? They're different and unrelated languages. You also better have server side validation in addition to the client side.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  6. #16
    focus is offline x10 Sophmore focus is an unknown quantity at this point
    Join Date
    Feb 2008
    Posts
    112

    Re: SQL Injection?

    Quote Originally Posted by misson View Post
    You don't need a page for every product. One script can cover the order form, and another for product info.
    So just to confirm... Your saying that product info (multiple pages) should all be linking to the same order (i understand how to do this) or 1 order form and 1 product info page should be created and they get the information from somewhere?

    Also if it is that I have 1 order form that the product info pages use, how can i change the image that is sent to mail and displayed on the confirmation page?

    For example say you have

    Shoe 1:
    <a>Picture</a>
    Product ID
    Name
    User Details

    Shoe 2:
    <a>Picture2</a>
    Product ID
    Name
    User Details

    how do i dynamically display the different pictures?

    Below is a link of a page that I want to add a captcha to just to get a better idea.

    http://getstepping.com/test/16615.html
    Last edited by focus; 05-28-2010 at 12:02 PM.

  7. #17
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: SQL Injection?

    Store product information, including sample image URL, in a database. Anytime you need to generate a page that includes information about a product (such as the order & product info pages), fetch it from the DB. You only need one script for all product info pages. For more on how to do this in PHP, read "Writing MySQL Scripts with PHP and PDO". If you're not familiar with relational DBs (the most common DB option), read the suggestions in "where to begin?" and
    Make sure you take security into consideration when creating you DB access layer.
    Last edited by misson; 05-28-2010 at 03:35 PM.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

+ Reply to Thread
Page 2 of 2 FirstFirst 12

Similar Threads

  1. SQL injection?
    By callumacrae in forum Programming Help
    Replies: 20
    Last Post: 01-12-2010, 02:29 PM
  2. Against SQL injection (PHP-MySQL)
    By hipro1 in forum Programming Help
    Replies: 2
    Last Post: 08-08-2009, 08:50 PM
  3. SQL Injection
    By conker87 in forum Scripts & 3rd Party Apps
    Replies: 0
    Last Post: 11-06-2007, 08:39 PM
  4. SQL injection
    By cactus1805 in forum Free Hosting
    Replies: 0
    Last Post: 04-07-2007, 05:22 AM
  5. Injection Magazine
    By mattspec in forum Graphics & Webdesign
    Replies: 2
    Last Post: 01-12-2006, 07:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers