Simple Login Page To Delete And Edit Things In Mysql Database
How do I build a simple login page on my site? I need a way to login to my admin area in my webshop, so I can add, delete and edit things in mysql database. I don't need help with add, delete and change things, only the login thing.
The users should not even know that there is a admin login page. The users don't login to shop, they just shop so I can't use the user login page because there is no such page. Can someone please give me some guidelines for this?
View Complete Forum Thread with Replies
Related Forum Messages:
Database Update/edit And Delete
i have spent the last few days trying to create a simple script to add/edit and delete entries in a mysql database with php. i have 1 database with 40 tables, each table has 3 fields (id, header and body) i created an input page with input fields for header and body. the table to store the information in is selected from a drop down menu. all this works fine. for some reason i cannot get the edit and delete page top work at all. would someone mind taking a look at the code and let me know what i am doing wrong? Code:
View Replies !
Simple Login Page
I would like to ask on how to create a PHP script with my login page. These are my details: txtusername -> for username txtpassword -> for password $host = "localhost" $database = "crismon"
View Replies !
Create A Simple Login Page Using Php And A Post Form.
trying to create a simple login page using php and a post form. The following requirement holds, 1. there should NOT be any DB. 2. One user and one password is enough (yeah, said it was a simple one...) Tried with a function check_user() in a lib php-file, and a post form in the login page. Code as follow: <?php function check_user(){ global $userfield, $pwdfield; if( strcmp($_POST[$userfield],"user") == 0 ) { if( strcmp($_POST[$pwdfield],"pwd") == 0 ) { // Correct user echo("correctdir/album.htm"); } else { // Wrong pwd echo("../somdir/default.htm"); } else { // wrong user echo("../otherdir/default.htm"); } } } ?> and the login page for is: <?PHP require('../somelib/login_lib.php'); ?> .... <form name="form1" method="post" action="<?php check_user();?>"> <input type="text" name="userfield" > <input type="password" name="pwdfield" > <input type="submit" name="Log in" value="Log in"> </form>
View Replies !
Edit Details From Mysql Database
What i want to do is edit details that have been taken from mysql database and display them in a text box. I'm under standing what I’ve done so far which was to bring the job id code of the job that i want to edit from another page and i no the code to edit but what i can’t do is display the job data into a text box so it can be seen and edits can be made. All the books and website and forms I’ve read don’t show how to display the data to a text box or it’s so complicated that i don’t have a clue what’s going on? Code:
View Replies !
Looking For Simple MySql Login/Session
I've never had any password protection so far so, I'm rather new to the coding...(I know the process though--) Anyway, I've been looking for a good tutorial on google and on the search option on these forums for a way to easily have a secure, yet simple register/login/session pages--Explaining tutorial... Also, I will edit the register form so that it carries more information, I'd prefer if the tutorial would just look for username then password in the database and ignore any other columns..
View Replies !
Page Edit User Interface (MySQL)
i have the section on my site where each page (php) displays the content from a single cell on my DB as the body. i then wanted my admins to be able to edit the content in this table. rather than teaching them how to use MySQL i just thought i'd set up a page which stores and retrievs data. the code i wrote is as follows: Code:
View Replies !
How To Delete MySQL Database.
I've got three hostings with the GoDaddy hosting service. The hostings are supposed to provide only one MySQL database each. I've just recently noticed in the phpMyAdmin program that separate databases, each with the name "test," has appeared in two of the three hostings. I don't know how they got there. I didn't put them there. I contacted GoDaddy's technical support. They said that the "test" databases automatically comes with the phpMyAdmin program. Of course, that's not right. Anyway they said that I could delete the extra database without damaging anything.
View Replies !
Delete Data From MySQL Database
I am new to PHP and MySQL but I have setup a MySQL database. I can view the information in an HTML table using PHP scripts and can delete an entry form the database table, but what i need to do is to be able to delete an entry by selecting a radio button next to the relevent information however when i try to add a form in the PHP script i get an error.
View Replies !
FFDB Edit And Delete
I've got a news program that you can upload the new news via a form, puts the data into a text file etc. I'm trying to find a way to delete certain lines from the txt file and to be able to edit them. I've played around with a few things but i just can't seem to get anything close to what i'm after. I've looked around the web but all i can find is like "open the file > put into array > do what needs to be done > write back to the file" which isn't exactly that helpful. Could anybody point me in the right direction as to how to do this? maybe with a better description/example? =D
View Replies !
MySQL DELETE: How To Get Page To Refresh?
I have a script that deletes records in a table. It works fine. However, it redirects the browser back to the page and the record stills shows there. Only after the page is manually refreshed does it disappear. I've used both header("Refresh...") and header("Location...") to accomplish the redriect, but no dice. The only thing that seems to work is if a unique URL is pushed into the address bar, which I do by appending md5(microtime()) to the end of the redirect URL.
View Replies !
Edit Delete Form And Quotations
I have a form where I add a lot of ' and " for feet and inches into MYSql and most of this works fine except when I go back to the Edit/Delete Form. It stores the ' and " in the database, reads and outputs the ' and " on my page but when I use the edit/delete form it cuts off at the '. Is there a simple solution to this on an edit/delete form ?
View Replies !
Define Files For View/edit/delete
I am working on this little file manager project, I know, there's lots out there. However, I couldn't find one that paged the results that didn't use a DB. Now that I have it set up (works great), I'm not sure how to define the files and not mess up the paging - so that if it's a folder you can open it and work with the files, a photo you can view or delete it and if it's a .txt, .php. etc. you can edit it. Code:
View Replies !
Do Things To One Database Result Then Move On...
so what i have is a orders database which goes order number, customer number, product, quantity etc. now for each different product ordered, im entering a new row, and grouping them by order number- ie all products ordered at one time will have the same order no. Code:
View Replies !
Delete Record - When The Delete Link Is Clicked The Next Page Is Blank And Nothing Is Deleted.
This is my "delete.php" and this "todo/delete.php?id=64" an example of a link to it generated from the index.php page. When the delete link is clicked the next page is blank and nothing is deleted. What have I done wrong? <? include("dbinfo.inc.php"); mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $id="delete from todo where id='$id'"; mysql_query($id); mysql_close(); ?>
View Replies !
Use A Simple Form Into Html Verified Against A Mysql Database
I'm setting up an account login: should I use a simple form (user name and password) "embeded" into html verified against a mysql database or should I use the challenge/response scheme (also verified against a mysql database? Basically, is there any benefit to using challenge/response over merely submitting user name and password (like a search engine)?
View Replies !
Simple A-Z Link List For Searching Mysql Database
I'm trying to set-up a simple A-Z list so that people can search a mysql database by each letter. Click on "A" get all records in the DB that start with "A". I have it working no problem but i want to be able to add "#" so that the user can get all records that start with a Number. For some reason the query i'm running won't grab any records that start with a number? here is the query:
View Replies !
PHP Login Problems (with MySQL Backend Database)
I run a book exchange web site based in PHP with a mysql database. Many users have having trouble logging in. Here is a description of the problem. A user types in his/her username and password and hits login. The browser thinks for a bit then the login screen comes up again and nothing has happened (except now the username and password fields are blank). Here is a snippet of the code... session_register( "email" ); session_register( "passwd" ); #setcookie( "email", $email, time()+3600*24*365 ); I commented out the setcookie function because many users use the same computer and they were able to use the same computer with the setcookie function in there....
View Replies !
Security Concerns While Designing A Login Script / Page In Php + Mysql
I am a bit new to php. I am designing a new login page for my website (using php, mysql database). However, as php + mysql, both are open source, there are many security risks invovled, so that experienced users, while designing a login page, take care to follow certain guidelines. Being a novice, i think it would be helpful to many (including me), to review here, once again, methods / procedures / guidelines to be followed, while designing a login script. [So as to prevent the website login system from - unauthorized access, malicious inputs in login fields, etc].
View Replies !
Simple Delete From Array?
Any way to do a simple delete from array? In other words, what would be the *easiest* (and fastest php runtime) way to delete "banana" from the following array: $my_array = array( "apple", "banana", "grape", "lime" ); .....so that $my_array will now be: $my_array = array( "apple", "grape", "lime" );
View Replies !
Simple Delete Query
This code should delete a row from the database where ID = ID however it doesn't seem to be doing its job PHP Code: <? if(isset($_GET['id'])) { Â Â Â Â Â Â Â Â $query = "DELETE FROM mynews WHERE id = '" . $_GET['id'] . "'"; Â Â Â Â mysql_query($query); Â Â Â Â echo "<p align='center'>Deleted</p>"; Â Â Â Â } else { Â Â Â Â Â echo "<p align='center'>Not Deleted</p>"; } ?>
View Replies !
Mysql Delete - $query = Mysql_query("DELETE
how would i do the following ? $query = mysql_query("DELETE notes, datestamp, abs_value, ID FROM absence_mgt WHERE datestamp='$date' AND ID='$vtc_login' ") or die(mysql_error()); im just getting "Unknown table 'notes' in MULTI DELETE" ?
View Replies !
Simple Delete Of File Question
I have a dynamic list of images Code: $files=directory("../photos/","jpg,jpeg,Jpg,JPg,JPG"); foreach($files as $pic){?> <img width="150" src="<?php echo $path.$pic;?>" align="bottom" /> <input type="button" name="Submit<? echo $ct?>" value="Delete" /> <?php echo $path.$pic;?><br/> <?php }?> There's got to be a simple way to have this button delete just that file.
View Replies !
Create A Separate Page With One Login That Let's Me Login To All Of The Sripts At Once?
I'm building a website using various php scripts from I found on hotscripts. Because I'm not much of a programmer myself I'm using a separate script for the blog, another one for the links section and a different one for the gallery and so on. The downside to this is that I have to login on a separate page to update the gallery and another page to update the blog and so on. Is there a simple way to either remove the need for a login for all the scripts and just create a separate page with one login that let's me login to all of the sripts at once? Or if there's a script that can kinda save the passwords and logs in for me?
View Replies !
Simple Login Sys
I want a simple login sys, That saves all deatails to a txt file, I want it so that when a name is entered then it will name the file as the name. So when someone create an acct, There will be a place for there name, there Email & there password. I hope you get it so far. Well here is the php PHP Code: <?php $ip = getenv('REMOTE_ADDR'); $date=date("d/m/y, g:i a");; $data = "<br /> IP: ".$ip. "<br /> Time: ".$date. "<br /> Name: ".$_POST["name"]. "<br /> E-Mail: ".$_POST["email"]. "<br /> Password: ".$_POST["password"]; $fp = fopen('$_POST["name"]', 'w'); fwrite($fp,$data); fclose($fp); ?>
View Replies !
Edit Page
ok so I have a resutls page with records displayed from a search. Next to each record is an edit icon. Here is the code:
View Replies !
Main Page Login = Forum Login
This is going to be a website for a club im in at University. Now, I only want members of that club to be able to register. The problem is that they pay a member fee. I want to know a way that when they pay me the fee (in person) I can give them a unique confirmation number from which they can register properly (sorta like a CD-Key). Code:
View Replies !
Edit The Entries In The Database
I have a script that allows you to edit the entries in the database. All is working fine except when you pull up an entry for editing the subject field only prints out the first word of the subject??? I know the entire subject line is in the database, but only this part of the script won't print it out. All the other fields work fine. Code:
View Replies !
Edit Data In A Database
I am using PHP4 and Access, i can output the info to the screen but i then want to be able to edit it. The code below does this using MySql, basicaly i need the equivalent for odbc. I think i am looking to change these functions: mysql_affected_rows(), mysql_query() and mysql_fetch_array() After looking at the php manual i found this one odbc_fetch_array(), but not the other 2. Any ideas anyone? Code:
View Replies !
Simple Login Script
im creating a simple login script and i dont have a problem yet but im wondering if there is a way that i can improve this bit of code, this is what i have for validating the fields. Code:
View Replies !
Graphically Edit A Page?
I am a Java programmer who sometimes dabbles in simple PHP stuff, and had a question that's way over my head, for you PHP experts. I would like to know how to dynamically edit a cuurently static HTML page which contains a map of a stands at a convention center. The static version of the page can be found here: I would like to be able to *visually* edit this page -- create, modify (re-shape and move boxes, assign data, etc.), and delete boxes on the page, and then click on a "Save" button to save the changes in my database. I am a feeling what I am asking for is something much more suited to Flash but I need to do it in PHP. Does anyone know of a graphic editor out there, something that allows drag-and-drop and stretching of HTML (DHTML) elements?
View Replies !
Edit Form Page
i have a edit form for my brand items and one of the items that i may need some alidation is the brand name. my problem is, i need a validation code for the brand name, wherein if the brandname was changed it will execute this validation to check if there is already an existing brand name but if the brandname was not changed it will not execute this validation code. currently this the validation code that i am using: $sql_brand_name_check = mysql_query("SELECT brand_name FROM engsoon_brands WHERE brand_name!='$brand_name' AND bid!='$bid'"); Â $brand_name_check = mysql_num_rows($sql_brand_name_check); Â if($brand_name_check > 0){ Â echo '<script language=javascript> alert("brand name already exist.<br>use a different brand name!");top.location = "brandsmngr.php?id=3&bid='.$bid.'";</script>'; Â unset($brand_name); Â exit();
View Replies !
Edit The User Information In The Database
I am using php to write a login script.I have create a database to store user registration information..well done..I can register and all the data stored in the database well. BUT I wish to edit the user information in the database..how can I do it? Where can I get these example of source code.
View Replies !
Edit Flat File Database
I am looking to edit a record set in a flat file database. The user clicks on a link with an id to the page events_edit.php. I am trying to have it so that it can get all the information related to that id and then I can put it into the value="" field in the html. I Will then have to work out how to make it update.
View Replies !
Simple Session Login Problem
I created a php page that will create a session for a user. My problem is that once they are logged in, I dont know how to send them to the secure page. I dont know where to place the following lines of code: (also not sure where on the server the pages are placed) header("Location: http://www.mysite.com/index.html"); exit; Original code------------------------------------------------- <? session_start(); ?> <html> <head> <title> </title> </head> <body> <? $_Username = "user"; $_Password = "password"; // If the form was submitted if ($_POST['Submitted'] == "True") { // If the username and password match up, then continue... if ($_POST['Username'] == $_Username && $_POST['Password'] == $_Password) { // Username and password matched, set them as logged in and set the // Username to a session variable. $_SESSION['Logged_In'] = "True"; $_SESSION['Username'] = $_Username; } } if ($_SESSION['Logged_In'] != "True") { echo "<form method="post" action="" . $_SERVER['PHP_SELF'] . ""> Username: <input type="textbox" name="Username"><br /> Password: <input type="textbox" name="Password"><br /> <input type="hidden" name="Submitted" value="True"> <input type="Submit" name="Submit"> </form>"; } else { echo "You are logged in as: <b>" . $_SESSION['Username'] . "</b> <br /><a href="" . $_SERVER['PHP_SELF'] . "?mode=logout">Logout</a>"; } if ($_GET['mode'] == "logout") { session_start(); $_SESSION = array(); session_destroy(); echo "<META HTTP-EQUIV="refresh" content="1; URL=" . $_SERVER['PHP_SELF'] . "">"; } ?> <p> </p> </body> </html>
View Replies !
Simple User Login Script...
I want a simple user login page/script that does not run over a DB. The main reason for this is to ease deployment and because security is not a huge deal for the data being protected. Here's what I'm trying now. It isn't working. Code:
View Replies !
CURL :: Simple Login Not Working
cURL script: <?php $curl = curl_init(); curl_setopt($curl, CURLOPT_URL,"http://www.crackarcade.com"); curl_setopt($curl, CURLOPT_POST, 1); curl_setopt($curl, CURLOPT_POSTFIELDS, "username=games&password=games"); curl_exec ($curl); curl_close ($curl); echo $curl; ?>
View Replies !
|