Search the Community
Showing results for tags '404 error'.
-
There is a 404 error that redirects to the home page instead of correct page. I've checked my links for accuracy. How can I fix this to where I can redirect the link to the appropriate page (parts ordering page)? Is there something I can do in CS-Cart or will I have to adjust something in my cPanel? Please help.
-
Hi, I have an html page with a form that people fill out and when they press 'submit' I use a POST php method to save the information they entered onto a .csv file in the directory in my server. The php code is in a separate file that I call from the HTML page. However, I'm getting a 404 error saying that the php file which handles all that input cannot be found. THIS IS THE Javascript ON THE HTML DOCUMENT THAT GETS ALL THE VALUES FROM THE FORM WHEN THE SUBMIT BUTTON IS PRESSED: //FUNCTION: Button press var demogCont = function(){ var timestamp = new Date().getTime(); var age = document.getElementById('age').value; var freq = document.demographics.item1.value; var time = document.demographics.item2.value; var eng = document.demographics.eng.value; var email = document.demographics.email.value; var demogs = [[age, freq, time, eng, email]]; var JSONdemogs = JSON.stringify(demogs); var postArray = {timestamp:timestamp, json:JSONdemogs}; if (document.demographics.email.value.length > 0){ $.post("demogstore.php", postArray, function(){ window.open('demographics2.html?demog=true&ts='+ timestamp,'_self',false); } ) .error( function(){ alert('Communication error with server.'); window.open('demographics2.html?demog=true&ts='+ timestamp,'_self',false) } ) } }; THE PHP FILE LOOKS LIKE THIS <?php // decode JSON string to PHP object $timestamp = json_decode($_POST["timestamp"]); $decoded = json_decode($_POST["json"]); $fp = fopen('PHP_data'.$timestamp.'_data.csv', 'a'); foreach ($decoded as $fields) { fputcsv($fp, $fields); } fclose($fp); ?> The file path and the file name are correct. Does anyone know what could be causing this error?