ki Posted February 15, 2007 Share Posted February 15, 2007 is there a way I can make it so my form (thats included) will go to the same page (with variables) and still process? Quote Link to comment Share on other sites More sharing options...
trq Posted February 15, 2007 Share Posted February 15, 2007 Just dont give your form an action attribute. eg; <form method="post"> Quote Link to comment Share on other sites More sharing options...
ki Posted February 15, 2007 Author Share Posted February 15, 2007 Thanks, also, its for a forum I used like if (!$_SESSION[logg] == 0) or something { include(file.login) } else { display forum crap } but when i post it it goes to a blank screen, buit it set the variables i needed to logon but i need it to display the other page contents? any suggestions? Quote Link to comment Share on other sites More sharing options...
Kemm Posted February 15, 2007 Share Posted February 15, 2007 Thanks, also, its for a forum I used like if (!$_SESSION[logg] == 0) or something { include(file.login) } else { display forum crap } but when i post it it goes to a blank screen, buit it set the variables i needed to logon but i need it to display the other page contents? any suggestions? Can you post the code maybe? Quote Link to comment Share on other sites More sharing options...
ki Posted February 15, 2007 Author Share Posted February 15, 2007 SAMPLE: if ($_SESSION['logged_in'] == 0) { include("login.php.inc"); } else { $forum_id = $_GET['forum']; } LOGIN.PHP.INC <? ob_start(); require_once('config.php'); session_start(); if(isset($_POST['submit'])) { mysql_crap_here $_SESSION['logged_in'] = 1; $_SESSION['username'] = $_POST['username']; $_SESSION['password'] = $_POST['password']; session_write_close(); } else { echo "INPUT HERE"; } ?> Quote Link to comment Share on other sites More sharing options...
Kemm Posted February 15, 2007 Share Posted February 15, 2007 SAMPLE: if ($_SESSION['logged_in'] == 0) { include("login.php.inc"); } else { $forum_id = $_GET['forum']; } LOGIN.PHP.INC <? ob_start(); require_once('config.php'); session_start(); if(isset($_POST['submit'])) { mysql_crap_here $_SESSION['logged_in'] = 1; $_SESSION['username'] = $_POST['username']; $_SESSION['password'] = $_POST['password']; session_write_close(); } else { echo "INPUT HERE"; } ?> The second code, start it with <?php ? Quote Link to comment Share on other sites More sharing options...
ki Posted February 15, 2007 Author Share Posted February 15, 2007 Would it matter? But also login.php.inc is processed after the check to see if the user is logged in. So refresh? Or anyone know a code to refresh the page? Quote Link to comment Share on other sites More sharing options...
Kemm Posted February 15, 2007 Share Posted February 15, 2007 Would it matter? But also login.php.inc is processed after the check to see if the user is logged in. So refresh? Or anyone know a code to refresh the page? Just use a simple javascript code: <FORM> <INPUT TYPE="button" onClick="history.go(0)" VALUE="Refresh"> </FORM> And dont you need "<?php" in front of all codes? Quote Link to comment Share on other sites More sharing options...
trq Posted February 15, 2007 Share Posted February 15, 2007 What is the problem? Your question is exteremely vague. Quote Link to comment Share on other sites More sharing options...
Balmung-San Posted February 15, 2007 Share Posted February 15, 2007 And dont you need "<?php" in front of all codes? Not if you have short tags (<? code ?>)or asp tags (<% code %>)enabled, but it's highly suggested you use <?php, as that's compatible in all configurations. As for the problem at hand, besides the question being vague, I'm thinking it may have to do with your file extension. Is your web server setup to handle .inc as a PHP file? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.