Jump to content

My code registers blank records


SirChick

Recommended Posts

LOL now this is guna get even more wierd!!!

 

Error produced:

 

 

Notice: Undefined index: security_code in C:\xampp\htdocs\RegisterPage.php on line 14

 

 

That is referring to this:

$UserCaptcha = mysql_real_escape_string($_POST['security_code']);

 

thats relating to the html you asked me to try which is :

<img src="<?php include 'CaptchaSecurityImages.php';?>" /><b><font style="font-size:13px" color="#FFFFFF" face="Arial">Security Code:

<input id="security_code" name="security_code" type="text" /></center>

Link to comment
Share on other sites

  • Replies 55
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I then did it a second time with the security code being "correct" instead of incorrect which is what i on that previous post and got this:

 

 

Notice: Undefined index: TermsOfService in C:\xampp\htdocs\RegisterPage.php on line 23

 

Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\RegisterPage.php:23) in C:\xampp\htdocs\RegisterPage.php on line 48

Arraytest

Notice: Undefined index: security_code in C:\xampp\htdocs\RegisterPage.php on line 54

 

Your security code input did not match the generated image, please try again!

 

notice the bit in bold? which is funny cos that was correct and its telling me it isnt and when i have it incorrect it lets it through :S its doing the absolute oppsite

 

 

the "Arraytest" i think is one of my echo's but not sure which variable... weather it was the user's captcha of the image one

Link to comment
Share on other sites

i believe your almost there because you have the header error i was about to ask that because you put the session start on that page in the middle ur lucky for one member answering because this issue is posted at the top of the board loook put the session start on the top most of the page before any output to be displayed

 

now in the undefine index error its telling you that its not actually set or no such index named that your actually referring so use isset 

Link to comment
Share on other sites

ok firstly session_start(); is now line 2! the only thing before it is :

 

 

<php

session_start();

 

 

 

 

Now relating to this :

Notice: Undefined index: security_code in C:\xampp\htdocs\RegisterPage.php on line 54

 

 

Line 54 is this:

If($Captcha != $UserCaptcha) {

  < Error

 

How only that if statement cause an error when at line 15 the exact same if statement is being used except the != is a ==

 

Line 15 is:

if($Captcha == $UserCaptcha){

  < No error

 

 

 

*And just to add, i inputted the usercaptcha so it would be the same as the captcha but it said "incorrect security code".

 

 

 

 

I also moved the session to the first thing after the php tag... but i still get the error:

 

1 <php

2 session_start();

3

 

 

Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\RegisterPage.php:23) in C:\xampp\htdocs\RegisterPage.php on line 48

 

Link to comment
Share on other sites

note undefine index means that its not actually present in the code so fi your conditioning for empty then replace it for isset and now i have to say this read the tread on the top of the board for that error because without looking at the code im sure its the header file on that line or sessionstart

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.