What's new

Closed guyz help me pls for my project.. i want to graduate huhuh :(

Status
Not open for further replies.

izone21

Enthusiast
Joined
Aug 20, 2015
Posts
2
Reaction
0
Points
62
Age
34
my instructor told us to do a simple website im not familliar in codes pls help me... this are the description below
Description of Operations:
* Guest Part:
The end user can browse different kinds of latest smart phones per brand and types with pictures.

* Admin Part:
Admin can:
- create, modify and deletes latest smart phones with details per brand and types enable to upload pictures.

Method/s:
- gallery_gd
- use PHP5 and mysqli with OOP Syntax and prepared statements ONLY for the sql queries.
 
try mo irun tapos edit mo na lang...
LOG-IN FORM



I want to make a single login for just 1 user without storing in a database but i cant seem to get this to work. My code: login.php

<html><head><title>Login</title></head><h3>Add entry</h3><p> Add another Article</p><formaction="trylog.php"method="post"><labelfor="username">Username</label><inputtype="username"id="usename"name="username"><br/><br/><labelfor="password">Password:</label><inputtype="text"id="password"name="password"><br/><br/><buttontype="submit">Login</button></form></html>
trylog.php

<html><title>Login</title><body><?php
$usr ="admin";
$psw ="password";
$username ='$_POST[username]';
$password ='$_POST[password]';//$usr == $username && $psw == $password
session_start();if($_SESSION['login']==true||($_POST['username']=="admin"&& $_POST['password']=="password")){
echo "password accepted";
$_SESSION['login']=true;else{
echo "incorrect login";}?>

<formname="input"action="adminportal.php"method="get"><inputtype="submit"value="Home"></form></body></html>
 
try mo irun tapos edit mo na lang...
LOG-IN FORM



I want to make a single login for just 1 user without storing in a database but i cant seem to get this to work. My code: login.php

<html><head><title>Login</title></head><h3>Add entry</h3><p> Add another Article</p><formaction="trylog.php"method="post"><labelfor="username">Username</label><inputtype="username"id="usename"name="username"><br/><br/><labelfor="password">Password:</label><inputtype="text"id="password"name="password"><br/><br/><buttontype="submit">Login</button></form></html>
trylog.php

<html><title>Login</title><body><?php
$usr ="admin";
$psw ="password";
$username ='$_POST[username]';
$password ='$_POST[password]';//$usr == $username && $psw == $password
session_start();if($_SESSION['login']==true||($_POST['username']=="admin"&& $_POST['password']=="password")){
echo "password accepted";
$_SESSION['login']=true;else{
echo "incorrect login";}?>

<formname="input"action="adminportal.php"method="get"><inputtype="submit"value="Home"></form></body></html>
maraming salamat po d2.. subukan ko po ito boss.. :D
 
Dear izone21,

Since 2 years have passed since the last reply in this thread, I am locking it to prevent necroposting. Feel free to start a new thread or contact any forum staff if you want this to be reopened.

Thread closed.
 
Status
Not open for further replies.
Back
Top