Jump to content

Submit Form Not Processing


SalientAnimal
Go to solution Solved by Ch0cu3r,

Recommended Posts

Awesome thanks, it works perfectly... The last issue now is when printing the number of rows inserted is will count the number of characters at the end of the string.

 

i.e.

1 record has been successfully added. Please wait to be redirected.67

This is what is being "echoed" on my success page. and the 67 at the end should not be there.

Link to comment
Share on other sites

where do you output this text:

record has been successfully added. Please wait to be redirected.

 

Maybe it's right after that sentence.

 

 

This is the output file:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<!-- HEADER CONTENT OF PAGE - THIS CONTAINS ALL SCRIPT, CSS, AND META TAG RELATED INFORMATION FOR THE WEBPAGE -->

<?php
printf("%d Records have been added, please wait to be re-directed.\n", $insert_stmt->affected_rows);
include_once 'includes/db_connect.php';
include_once 'includes/functions.php';
include_once 'includes/session_management.php';
?>




<!-- INCLUDE THE HEADER INFORMATION. AN EXTERNAL SHEET HAS BEEN CREATED TO STORE ALL THE FORMATTING -->
<head>
<title>Altech Autopage - Premier Viewer</title>
	<script language="javascript">
    setTimeout(function () 
	{
	window.location.href = "http://localhost/walkin_form.php"
	}, 3000);
	</script>
	<meta http-equiv="refresh" content="5;url=http://localhost/walkin_form.php">
</head>
</html>
Link to comment
Share on other sites

This is the only function that I'm using

function getToken($length=32){
    $token = "";
    $codeAlphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
    $codeAlphabet.= "abcdefghijklmnopqrstuvwxyz";
    $codeAlphabet.= "0123456789";
    for($i=0;$i<$length;$i++){
        $token .= $codeAlphabet[crypto_rand_secure(0,strlen($codeAlphabet))];
    }
    return $token;
}

that has strlen in it. The number 67 is a count of how many characters are in my "Success" message. What I don't understand is why this number is being echoed as nowhere am I calling this function. I have no idea where the mystical number is coming from.

Link to comment
Share on other sites

  • Solution

You need check the code within your includes. As Mace said that is most probably where it is coming from. To tell which one it could possible be change your your include lines to

echo '--';
echo 'db<br>';
include_once 'includes/db_connect.php';
echo 'func<br >';
include_once 'includes/functions.php';
echo 'sess<br >';
include_once 'includes/session_management.php';
echo '--';

Which ever the number 67 appears against that it is file you need to check. Basically look for an any echo/prints's within that file.

Edited by Ch0cu3r
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.