But I'm kinda a newbie so I'm gonna try to tell what's the problem and why i ask this
I'm doing a login system than, for different users showing different services, and until the moment all the login process has successfully ended just fine and works perfectly, BUT
some of this services i wanna add include the use of a form, the forms are HTML, and the "session_start( )" are PHP like all of you must know, so this is the question.
(already try with echo, btw)
Is there any way to add a form (html based) inside a PHP script to actually works depending of if it's working or not the `session_start( )`?
With the "Session_start( )" i mean if he is or not log-in
Have in mind that the service is gonna be used by the person who login
in other words:
Expand|Select|Wrap|Line Numbers
- <?php
- session_start();
- echo $_SESSION['username'];
- echo $_SESSION['name'];
- echo $_SESSION['test'];
- if ($_SESSION['class'] === 7){
- } elseif ($_SESSION['class'] === 7 or 2) {
- // here i need a html form like this:
- // <form action="upload.php" method="post" enctype="multipart/form-data"><br />
- // <input type="file" name="info" /><br />
- // <input type="submit" value="Subir" />
- // </form>
- } elseif ($_SESSION['class'] === 7) {
- echo "esto también";
- } elseif ($_SESSION['class'] === 7) {
- echo "esto también";
- }
- ?>
PS: Any suggestion to improve the question, or question you have for clarification would be greatly appreciated too, just say it.