PHP/MySQL - Apostrophe Issue When Submitting a Form

  • Posted:
  • Proposals: 7
  • Remote
  • #853438
  • Awarded
Nitin N.
Deval U.CreativeInfoway R.Gaurav R.Haresh D. + 2 others have already sent a proposal.
  • 0

Description

Experience Level: Expert
Estimated project duration: 1 day or less
General information for the website: Class Registration
Kind of development: Customization of existing website
Num. of web pages/modules: 1-2
Description of every page/module: The goal is to troubleshoot and fix the issue with customers that have an apostrophe in their name and be able to successfully submit their registration and PayPal payment.
Description of requirements/features: We have an online class registration form that creates a database entry error when the name of the person has an apostrophe in it. Code has been implemented as follows, but continues to not completely process the student's registration.

$sql .= "'" . mysql_real_escape_string($_POST['lastname']) . "',";

For example: The student enters:

First Name: John
Last Name: O'Brien

When the form is submitted, the student is required to pay the course fee. For some reason, the form is submitted, the student gets an acknowledgement that his registration has been submitted, payment is received, but the registration stays in a "pending" status. Since it's in a "pending" status, the students is not officially registered into the class. The problem only occurs with student's that have an apostrophe in their name.

I had a previous PHP/MySQL person troubleshoot this and said it was fixed, but the problem still exists. The custom, non-CMS, site was built a few years ago. The site is completely functional and has been running for many years. For some reason, the apostrophe issue came up about a year ago and was never fixed.
Specific technologies required: PHP/MySQL
Extra notes:

New Proposal

Create an account now and send a proposal now to get this project.

Sign up

Clarification Board Ask a Question

    There are no clarification messages.