I am trying to create a popup and form with validation, but for some reasonthe process.php is not being found I was told to reclairfy my question.

I am using the jQuery below to go to my processing file:

<div id="thanks" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
    <div class="modal-content">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h4 class="modal-title">Redeem Points</h4>
    <div class="modal-body">
        <form class="form-horizontal" class="contact" name="commentform" method="post" action="<?php 
            bloginfo('template_url'); ?>/sendredeempoints.php" enctype="multipart/form-data">
                <div class="form-group">
            <h3>You may only redeem the maxium points of : <?php echo $maxpoints;?></h3>
            <input type="hidden" name="playerid" value="<?php echo $playerId;;?>" />
            <input type="number" valuemax="<?php echo $maxpoints;
                ?>" name="points" class="form-control" placeholder="How many points do you wish to redeem." />                  
            <label class="control-label col-md-4" for="Comments">Comments?</label>
        <div class="form-group">
            <div class="col-md-6">
                <button title="" data-original-title="" type="submit" value="Submit" class="btn btn-custom pull-right" id="send_btn">Send</button>
                <div style="top: -4px; left: 279px; display: block;" class="popover fade right in">
                    <div class="arrow"></div>
                    <h3 style="display: none;" class="popover-title"></h3>
                    <div class="popover-content">Thank You</div>
    </div><!-- End of Modal body -->
    </div><!-- End of Modal content -->
    </div><!-- End of Modal dialog -->
</div><!-- End of Modal --> 

$(function() {
    //twitter bootstrap script
            type: "POST",
            url: "process.php",
            data: $('form.contact').serialize(),
            success: function(msg){
            error: function(){


$playerid = $_POST['playerid']; // required        
$points = $_POST['points']; // required
$mymessage = $_POST['userMessage']; // required    
$email_from = '[email protected]';
$email_subject = $_POST['mysubject'];
$email_to = $_POST['toEmail'];

$headers = 'From: ' . $email_from . "\r\n" .
    'Reply-To: ' . $email_from . "\r\n" .
    'X-Mailer: PHP/' . phpversion();
@mail( $email_to, $email_subject, $mymessage, $headers );
  • Look in your browser's console for error messages.
    – Milo
    Commented Oct 29, 2015 at 15:36
  • their is no errors that what im sayingits just simple getting a 404 not found Commented Oct 29, 2015 at 20:48
  • Please clarify your question. What is giving you a 404? process.php? Your question says the modal is not appearing.
    – Milo
    Commented Oct 29, 2015 at 20:54
  • @Milo i refclairfied it their at tht etop mate Commented Oct 30, 2015 at 10:42
  • 1
    You also may have better luck on the main StackOverflow site as this seems to have nothing to do with WordPress. Commented Oct 1, 2016 at 1:22

1 Answer 1


If process.php is not found, your reference in the file is not correct. Make sure you reference to the correct path, for istance - if the file is in the rootdirectory of your site, add a slash in front of your code:

url: "process.php",

will be:

url: "/process.php",

If it is in the 'ajax' directory:

url: "/ajax/process.php",

Myself I usually provide a full path:

url: "http://myserver.bla/process.php",

Hope this helps

Not the answer you're looking for? Browse other questions tagged or ask your own question.