Jump to content

Search the Community

Showing results for tags 'form submit'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (Dreamweaver, Zend, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Hi all, The following code was working fine up until 1 hour ago and now fails to execute the PHP function call or anything within isset($_POST ​The JavaScript works successfully but I had to change the order in which form onsubmit and form action were called. As I said, I was getting the echo message back from the function until 1 hour ago. Here is the code. At the start of my page with the form: <?php session_start(); require_once 'class.user.php'; $user_home = new USER(); if(!$user_home->is_logged_in()) { $user_home->redirect('signin.php'); } $stmt = $user_home->runQuery("SELECT * FROM user WHERE id=:uid"); $stmt->execute(array(":uid"=>$_SESSION['userSession'])); $row = $stmt->fetch(PDO::FETCH_ASSOC); // print_r($row['learner_type']); ?> The code to check if the submit button has been clicked <?php if(isset($_POST['save_profile_changes'])) { $user_home->save_user_profile(); ?> <div class='alert alert-success alert-dismissible'> <button class='close' data-dismiss='alert'>×</button> <strong>Profile Submitted Successfully</strong> </div> <?php } else { //Left blank so it doesn't fire on form first load } ?> and the form code <form id="user_profile" name="user_profile" class="form-signin" onsubmit="return validateUserInput()" method="post" action="#"> <h2 class="form-signin-heading">Update Profile</h2> <!--Username, Email. Unchangeable for now--> <div> <strong> <label><strong>Username: </strong></label> <?php echo $row['username']; ?> <br> <label><strong>Email: </strong></label> <?php echo $row['email']; ?> </strong> <br> <a href="change_pass.php" style="padding-top:10px; font-weight: bolder">Change Password</a> <br><br> </div> <!-- First, Last Name --> <div> <input id="first_name" name="first_name" type="text" placeholder="First Name" class="form-control" minlength="2" maxlength="15" pattern="[A-Za-z]{2,15}" title="Only letters allowed" required> <input id="last_name" name="last_name" type="text" placeholder="Last Name" class="form-control" minlength="2" maxlength="25" pattern="[A-Za-z]{2,25}" title="Only letters allowed" required> </div> <!-- File Button --> <div> <label for="upload_photo">Upload Photo</label> <input class = "form-control" id="upload_photo" name="upload_photo" type="file" accept="image/*"> </div> <!-- DOB input--> <br> <div> <label for="dob">Date of Birth</label> <input id="dob" name="dob" type="date" class="form-control" min="1935-12-31" max="2014-12-31"required> </div> <!-- Gender --> <br> <div> <label for="Gender">Gender</label><br> <label class="radio-inline" for="gender-0"> <input type="radio" name="gender" id="gender-0" value="male" required> Male </label> <label class="radio-inline" for="gender-1"> <input type="radio" name="gender" id="gender-1" value="female"> Female </label> <label class="radio-inline" for="gender-2"> <input type="radio" name="gender" id="gender-2" value="other"> Other </label> </div> <!-- Region --> <br> <div> <label for="country">Select Your Country</label> <script type="text/javascript" src="assets/countries.js"></script> <select id="country" name="country" class="form-control" required></select> <script language="javascript"> populateCountries("country"); </script> </div> <!-- Occupation--> <br> <div> <label for="occupations">Select Your Occupation</label> <script type="text/javascript" src="assets/occupations.js"></script> <select id="occupations" name="occupations" class="form-control" required></select> <script language="javascript"> populateOccupations("occupations"); </script> </div> <!-- Primary Instructor Language --> <br> <div> <label for="languages">Primary Language of Instruction</label> <script type="text/javascript" src="assets/languages.js"></script> <select id="languages" name="languages" class="form-control" required></select> <script language="javascript"> populateLanguages("languages"); </script> </div> <!-- Bio --> <br> <div> <label for="bio">Bio (max 200 words)</label> <textarea class="form-control" rows="10" id="bio" name="bio" placeholder="Say a little about yourself." maxlength="200"> </textarea> </div> <!--Submission Buttons--> <hr> <div> <button class="btn btn-primary btn-common font18" type="submit" name="save_profile_changes">Save Changes</button> <a href="home.php" style="float:right; padding-top:10px;">Go Back Home</a> </div> </form> Thanks for any help you can provide.
×
×
  • 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.