Hello,
I would require some help with this html form which doesnt send information to the php file which is linked to it
HTML

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>RaffleCP</title>
    <link rel="stylesheet" href="css/body.css"/>

</head>
<body>
<!-- multistep form -->
<form id="msform" action="process.php" method="POST"  >
    <!-- progressbar -->
    <ul id="progressbar">
        <li class="active">Items</li>
        <li>Information</li>
        <li>Finalize</li>
    </ul>
    <!-- fieldsets -->
    <fieldset>
        <h2 class="fs-title">Item to raffle</h2>
        <h3 class="fs-subtitle">Please enter the desired item schema</h3>
        <input type="text" name="item1" placeholder="First item" />
        <input type="text" name="info1" placeholder="Attribute/info" />
        <input type="text" name="item2" placeholder="Second item" />
        <input type="text" name="info2" placeholder="Attribute/info" />
        <input type="text" name="item3" placeholder="Third Item" />
        <input type="text" name="info3" placeholder="Attribute/info" />
        <input type="button" name="next" class="next action-button" value="Next" />
    </fieldset>
    <fieldset>
        <h2 class="fs-title">Information</h2>
        <h3 class="fs-subtitle">Please enter information about raffle</h3>
        <input type="text" name="slots" placeholder="slots" />
        <input type="text" name="No" placeholder="Number of people" />
        <input type="text" name="Duration" placeholder="Duration" />
        <textarea name="otherinfo" placeholder="Other info"></textarea>
        <input type="button" name="previous" class="previous action-button" value="Previous" />
        <input type="button" name="next" class="next action-button" value="Next" />
    </fieldset>
    <fieldset>
        <h2 class="fs-title">Entry Fees</h2>
        <h3 class="fs-subtitle">Please enter the entry fees</h3>
        <input type="text" name="entfees" placeholder="Entry fees in credits" />
        <input type="text" name="entinfo" placeholder="Other Information" />
        <input type="button" name="previous" class="previous action-button" value="Previous" />
        <input type="submit" name="submit" class="submit action-button" value="Submit" />
    </fieldset>
</form>

<!-- jQuery -->
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js" type="text/javascript"></script>
<script type="text/javascript" src="js/main.js"></script>
</body>
</html>

Some help would be really appricated.
Thanks

Dani AI

Generated

Brief diagnosis: the form markup itself looks fine (as observed). The usual reasons the browser doesn’t load the action page are: the target PHP file is missing or not reachable, the page is being opened via file:// instead of an HTTP(S) server, or front-end JavaScript is intercepting/preventing the submit (often because required libraries didn’t load). and correctly suggested checking for a present PHP file and a running PHP-capable server.

Recommended, ordered checks and quick diagnostics:

  • Confirm process.php is present and served by HTTP. Request it directly in the browser; a 404 or plain-source PHP indicates it isn’t reachable or the server isn’t parsing PHP. A tiny diagnostic process.php that shows posted data is useful:
<?php
error_reporting(E_ALL);
ini_set('display_errors',1);
var_dump($_POST);
?>
  • Verify the page is loaded via a web server (http://...), not file://. PHP requires a server (a simple test is PHP’s built-in server: php -S localhost:8000 from the project folder).

  • Check DevTools → Console for JS errors and DevTools → Network for a POST to process.php when the Submit button is clicked. If no network request appears, JavaScript blocked the submit (main.js often wires the multistep behavior).

  • Confirm external scripts actually load. The posted HTML contains malformed script includes that embed anchor tags inside the src attribute; that will stop jQuery and any dependent scripts from loading and can break submission. In Console, typeof jQuery should be "function" when jQuery is loaded.

  • Quick runtime tests: temporarily remove/disable js/main.js or run this in the Console to force a submit:

document.getElementById('msform').submit();

If the diagnostic process.php shows the posted array after the forced submit, the problem is client-side JS; if it never shows, the file/path or server setup is the issue. Also check server error logs and enable PHP display_errors while debugging.

Recommended Answers

All 6 Replies

Your form seems OK based on your description. When the submit button is clicked the "process.php" page tries to load.

You need to be more specific about "doesnt send information". Maybe you are not retrieving the posted data correctly?

Thanks for the quick responce.
Sorry i didnt mention before that it does not redirect to the linked file i.e. it does'nt load

Does it gives an error? like page not found.

Because you dont have the file "process.php" yet.
Just write this file with coresponding php code in it.

Member Avatar for Member #120589

Show the content of the php file. Have you installed php and are you running a web server?

This form send data but you cannot accept its. I think)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.