Jump to content

Search the Community

Showing results for tags 'include php form'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

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


Languages

Found 1 result

  1. So i have these 2 forms. <form method="post" enctype="multipart/form-data"><input type="submit" name="start" value="Start" /></form> and <form method="post" enctype="multipart/form-data"><input type="submit" name="stop" value="Stop" /></form> now i need a script that when the start button in form no.1 is pressed the page refreshes and includes form no.2 with the stop button and than if the stop button is pressed it includes the start button. I tried to made this script. if ($server['Online'] == 0) { echo "<meta http-equiv='refresh' content='0;url=start.php'>"; }else { echo "<meta http-equiv='refresh' content='0;url=stop.php'>"; } but it is only including the forms, I would like to stay on the index.php and change the content in the div. The scripts needs to fit in the script below <?php if(!empty($_SESSION['LoggedIn']) && !empty($_SESSION['Username'])) { include('db/get_data.php'); //**SCRIPT HERE**// } elseif(!empty($_POST['username']) && !empty($_POST['password'])) { $username = mysql_real_escape_string($_POST['username']); $password = md5(mysql_real_escape_string($_POST['password'])); $checklogin = mysql_query("SELECT * FROM users WHERE Username = '".$username."' AND Password = '".$password."'"); if(mysql_num_rows($checklogin) == 1) { $row = mysql_fetch_array($checklogin); $email = $row['Emailaddress']; $_SESSION['Username'] = $username; $_SESSION['Emailaddress'] = $email; $_SESSION['LoggedIn'] = 1; echo "<meta http-equiv='refresh' content='0;index.php'>"; } else { echo "<h1>Error</h1>"; echo "<p>Sorry, your account could not be found. Please <a href=\"index.php\">click here to try again</a>.</p>"; } } else {?> <h1>Member Login</h1> <p>Please login below.</p> <form method="post" action="index.php" name="loginform" id="loginform"> <fieldset> <label for="username">Username:</label><input type="text" name="username" id="username" /><br /> <label for="password">Password:</label><input type="password" name="password" id="password" /><br /> <input type="submit" name="login" id="login" value="Login" /> </fieldset> </form> <?php } any ideas on how i can do it? Thanks before hand
×
×
  • Create New...