Drop into the PHP code to connect using MySQL and MyAdmin

This code should be as common as dirt, but I need help in looking for it. Considering how most of the sites have a mode of connection it surprises me that DW does not have some kind of widget to encode the fundamentals, but I digress.  I have a family site private, accessible by a username / password to a file static login.php. I think of moving to the next level will require the use of MySQL and a database... which seems a bridge too far... However, what I "think" I want to do is... (especially #5)

  1. a login for predefined members (40 odd) system using a primary e-mail address as ID.
  2. a connection that has a remember me option
  3. a connection that would show the user the last time that he / she has logged in and how many times.
  4. a method of sending an email with the username and password of the user
  5. a method of object defining his username and / or password.
  6. When changes are made an email is sent to me
  7. and... possibly different access levels / permissions, as in, shareholder have full access and no shareholders / clients have access to only a few pages.

Can point to a location that would have such a code available for a cut and paste the developer... with instructions

Thank you for your time.

Ralph3616 wrote:

  1. / * Adds a line of [] $authorization for each pair of login/password you want to add: * /.
  2. [$authorization] = array ('feldon', '123456', ' feldon @google.com ');
  3. [$authorization] = array ('ralphv', '1234only', ' [email protected]');
  4. [$authorization] = array ('guest', '1234guest', ' [email protected]');

(How?)

  • Check if the email address exists and if so
  • Send an email to this address with the user name and password on this line. And a brief message... "xxxxxx xxxx xxxx" and a subject heading.
  • Otherwise, a different error message on any match and contact [email protected]

A second page (the result of a failure, login) would have access to my login.php to find the desired information?

I could make a file (database?) on my server with this list?

Could this work? Can someone show me how?

Thank you for your time.

Here's one way you could do it, BUT it seems a lot of work if you have dozens of users - why your passwords/user names contained in the bays and not a database?

In any case taking the 3 examples you gave above, and assuming that you have sent your username to a 'recover' username and password ' page that has a form on it asking the the e-mail address of the user (gives the name of "email_address" entry field and then submit directly to the next page) : it grabs the value of the field in the form email_address and then checks through the berries if the email address exists. If he sends the user name and password to this email address.

I guess it's a site of low security keys so that you need not md5 passwords.

NOTE PLEASE I HAVE INSERTED AN "X" IN THE E-MAIL ADDRESSES WHICH NEEDS TO BR REMOVED. (SPAM)

<>

$email_address = $_POST ['email_address'];

[$authorization] = array ('feldon', '123456', ' [email protected]');

[$authorization] = array ('ralphv', '1234only', ' [email protected]');

[$authorization] = array ('guest', '1234guest', ' [email protected]');

{If (in_array ($email_address, {$authorization [0]}))}

$username = "feldon.

$password = "123456".

$email = "[email protected]";

$matchFound = 'success ';

}

{If (in_array ($email_address, {$authorization [1]}))}

$username = "ralphv";

$password = "1234only";

$email = "[email protected]";

$matchFound = 'success ';

}

{If (in_array ($email_address, {$authorization [2]}))}

$username = "guest";

$password = "1234guest";

$email = "[email protected]";

$matchFound = 'success ';

}

{if (isset ($matchFound))}

$to = $email_address;

Object

$subject = "Your user name and password";

$headers = "from: $email_address\r\n";

$headers. = "reply-To: $email_address\r\n";

build the message

$message = ' username: $username\n\n ";

$message. = "password: $password\n\n";

mail ($ $subject, $message, $headers);

ECHO "we sent you an email with your username and password';

}

else {}

echo "no user leaves with the e-mail address provided.

}

?>

Tags: Dreamweaver

Similar Questions

  • Drag and drop into the structure of recursive tree using af: tree

    I use version 11.1.1.2.0 jdeveloper.

    I have a table of the following structure:

    groupVO.
    id   name    parent_id
    1   group1   -1
    2   group2   -1
    3   subgp1    1
    4   subgp2    1
    5   leaf1        3
    6   leaf2        4
    7   leaf3        3
    To implement this as a tree, I created a static vo, RootVO, with a row (root-1).
    This is defined as the parent of groupVO using a link from the view.
    Then, I created a viewlink groupVO to himself.
    Then, I created an af:tree with these your. The tree looks like this:
    Root
         ->group1
                      ->subgp1
                                   ->leaf1
                                   ->leaf3
                      ->subgp2
                                   ->leaf2
         ->group2
    Now how can I implement drag and drop in this case?
    What I have to do in drag - move, it's just update the component parent_id enjoy the ID of the node dropsite.

    Also, I need to display the details of the node selected in a form. I found that by dragging the child vo does not have the trick here. It shows only the first child node of the table.

    Published by: josetuttu on July 17, 2011 23:23

    Hello

    I have a similar case (non recursive tree) described here.

    http://www.gabrielsideras.com/2010/10/23/ADF-drag-and-drop-functionality-in-an-aftree-component/

    To implement the move I use model method instead of a method to support bean.

    Gabriel.

  • Please give me the html code ready for use

    Dear Sir

    Please give me the html code ready for use

    Yes, we know now, it's the Telugu ;-) In any case, the subject of the question is not in this forum.

  • All that print from the web doing in the HTML code. I use the family XP Edition version

    All that print from the web doing in the html code. I use the family XP Edition version.  I'm almost on my home computer so I don't know when it happened first.  Try to print the boarding card.  Help.

    Thank you

    Hi GordonHarris,

    ·         You use Internet Explorer? If so, what version of Internet Explorer?

    ·         Did you do changes on the computer before the show?

    Follow these methods.

    Method 1: Follow these steps:

    (a) click Start, Control Panel, Add and remove programs.

    (b) click on set program access and defaults, select custom, select Internet Explorer as your web browser by default.

    (c) click OK.

    Method 2: Follow the steps in the article, if you are using Internet Explorer.

    I can't print or preview before printing a Web page in Internet Explorer

    http://support.Microsoft.com/kb/973479

  • How I can add the php code in my Web site muse

    How I can add the php code in my site muse?

    Insert you user-defined html.

    Mylenium

  • I bought adobe cc of my student account and installed. Then my computer broke down and I bought a new one. Do not know how to install cc on the new computer. The redemption code can be used and the web campus will not make another p

    I bought adobe cc of my student account and installed. Then my computer broke down and I bought a new one. Do not know how to install cc on the new computer. The redemption code cannot be used and the campus web allow me to make another payment within 1 year in term aid.

    I'll appreciate any help!

    The Adobe ID here in the forums have no CC registered to it, you can activate the CC to your Adobe ID twice. in case you have activated it twice, you have to disable among the previous machine or the third machine will give you the ability to disable from all the previous machine.

    Concerning

    Baudier

  • I'm not able to open the properties and the State in Local (or all network devices) network. Actually I am not able to connect to the local area network connection in network and sharing Center.

    Connection to the local network - properties dialog box

    Hi, I'm not able to open the properties and the State in Local (or all network devices) network. Actually I am not able to connect to the local area network connection in network and sharing Center. But I can't access the Internet. My OS is Windows 7

    Hello Rajaneer,

    Is the computer that you are using a personal computer or a work computer?
    You will need to re - install your network card drivers like something was damaged and it prevents you to access the property:
  • I want to download the HTML code for an existing site, and then revise in Muse. Is this possible?

    I want to download the HTML code for an existing site, and then revise in Muse. Is this possible?

    An existing site HTML files can be reused in Muse as Muse only works with files having the extension as .muse.

    However, you use apps like Dreamweaver to edit your existing HTML files.

  • Setting up a test server. Getting the error "Could not connect to MySQL". Help!

    First of all, I am a rookie at this, so please excuse me for leaving out some details.  In any case, I followed David Powers "establishing an environment of PHP for Dreamweaver development" set up my test server.  I tested the timetest.php file and everything works great.  I saved my website in its entirety and extracted its contents in my folder xampp/htdocs/php_test/CIM.  'CIM' is a file that I created to hold the content of my entire site.  I get an error message when I try to access my index.php file.  When I click on 'Live View', I get 'database error: unable to connect to the database: could not connect to MySQL'.»»  My index., is a php file in xampp/htdocs/php_test/CIM/public_html/store.  I too, started with Apache and MySql running XAMPP.  What I am doing wrong?

    If your timetest.php is like this:

    This page was created at on the computer running PHP.

    So which proves that you have PHP work.  I want to talk in DW when you try to establish a database connection.  Based on your error page there is no connection to the database.  The screen I'm talking about is:

  • Apple TV 4 will not play my movies that I had in itunes. It says unplayable format, but it is the same format that I use always and a lot of movies? What could this be?

    Apple TV 4 will not play my movies that I had in itunes. It says unplayable format, but it is the same format that I use always and a lot of movies? What could this be?

    This new IOS is bug.

    I had the same error message and tried to "create a different version" in Itunes.

    The ITunes says "this video is already formatted correctly."

    I tried to play again on the Apple TV and it worked then after a bit of buffering.

  • External hard drive suddenly cannot open it give the message error "you must format the disk in the drive until you can use it", and your hard disk is 0 bytes

    External hard drive can not suddenly open - fixed

    my external hard drive worked very well all the time, but suddenly I can't open it more, when I tried to open it, it gives the error message "You must format the disk in the drive until you can use it" and my hard drive is 0 bytes, average there is no file in the hard drive. Average, all the data inside hard disk are gone!

    Hello muhammad.

    Before you do anything with this player, you can search online for some data recovery utilities so that you can try to recover your data.

    What operating system do you use?

    Have you tried running chkdsk on the drive?

    Let us know.

    Best regards

    Matthew_Ha

  • How can I remove the Administrative Tools, network connections, printers & Fax and scanners and cameras my desktop icons?

    Recently, I installed a trial version of Tune Up Utilities 2009. During one of the scans/tune-ups, he gave me the option to display the Administrative Tools, network connections, printers & Fax and Scanners & cameras icons on my desktop. I checked ok, however, now, I think it's too crowded in my office and you want to remove them... right on the desktop, not everywhere else they are located. I tried everything I know to remove them without success. Anyone knows where is the menu option to display on the desktop so I can uncheck or choose Delete? I don't want to have to change all the .ini files or .bat to because I'm afraid I don't do it correctly and create other problems.

    Hello tellis1230

    I don't know what you have tried, but have a look here

    Right-click Desktop-desktop/properties/Office/Customization

    Uncheck what you don't want

    .

  • Help!  I'm stuck.  No, not the child into the well.  I took a picture and put a second layer top with a rounded rectangle to make a frame.  My problem is that I need to find a way to hide the small box outside the box on the second layer.  Thanks to

    Help!  I'm stuck.  No, not the child into the well.  I took a picture and put a second layer top with a rounded rectangle to make a frame.  My problem is that I need to find a way to hide the small box outside the box on the second layer.  Thanks to all those who can help you.

    Another option is to put the Options bar of the Rectangle rounded to the path tool

    Trash bolt for the background layer, hold down the Cmd key and click on the symbol of the new layer to layer below the image to white. Then edit > fill with white.

    Return the image layer and draw the image as a path

    Click the load as a selection path in the Panel traced

    Edit > stroke and stroke with color

    Select > Inverse > delete

  • CFScript to create tables (using MySQL) and configure it to use InnoDB

    I use a cfscript to create my database and the tables using MySQL, and I was able to DO this with success, accept that I'm having a problem. I want to put my tables use InnoDB instead of MyISAM. How to do this?

    That's what I did:

    < cfquery = 'test' datasource name = 'mydatasource' >
    CREATE TABLE Test
    (
    Id int (11) NOT NULL auto_increment,
    Name varchar (20) default NULL,
    Tinyint (4) active default NULL,
    PRIMARY KEY (Id)
    ); ENGINE = InnoDB DEFAULT CHARSET = latin;
    < / cfquery >

    But when I get an error when I run this script. That's what I get:

    -You have an error in your SQL syntax; "check the manual for your version of the MySQL server for the right syntax to use near '; ENGINE = InnoDB DEFAULT CHARSET = latin1'.

    I look and it's the right syntax. Any ideas what I am doing wrong?

    Thanks for any help

    Alfie

    Nevermind, I figured it. I misspelled it.

    ENGINE type = InnoDB... must be before the semicolon.

    :)

  • Why I can boot into safe mode with internet connection, use the operating system, etc., but can not open a normal session without password administrator; who got the disabled.

    OEM Vista Home Premium. Normal startup does not recognize the password. When you click User icon it says: "your account has been disabled. Please, see your system administrator"I looked in the mirror, but it did not help. Booted, press F8, went in safe mode with network connection. Everything seemed to be there. Surf the internet and then started to ask me why I don't have a password here when I did normal start-up. What is the password? Check "Microsoft Answers", but what I came out which was, I need to reinstall the OS, which I can't do it without a drive anyway.  I thought that I've used it before, I knew the password. This computer has been recently "reinstalled" internal folder 'restore '. Something must happen. A unknown password can be removed from safe mode? Ultimately how reinstall you a clean Vista when all you have is the key to product and no local or OEM support? What would be the difference between a password reset disk and the OS disk.  The two would probably be stored side by side. Not to mention that most of us Dummies want to just surf to buy, and if we can not surf, we cannot buy. Dummies help us get back on the internet, Microsoft. At least take care of this shot.

    Hi PAM,.

    In Safe Mode, try to activate the high administrator account http://www.howtogeek.com/howto/windows-vista/enable-the-hidden-administrator-account-on-windows-vista/.  Then log in using account and use it to solve problems with your normal administrator account login via control panel / user accounts / manage other accounts.  Find the one you want and make the appropriate changes to fix it.  If you can't, then you need to address as a corrupt account by using the following procedure:

    To fix this use http://windows.microsoft.com/en-AU/windows-vista/Fix-a-corrupted-user-profile.  If this is the only available administrator profile (you must be an administrator to solve this problem), activate the hidden administrator account (HAA) (i.e. what you did above, or you can do this by using these instructions instead: http://www.computerworld.com/s/article/9001970/How_to_access_the_true_Administrator_account_in_Windows_Vista?taxonomyId=17&pageNumber=1.)

    Once that is done, don't forget to disable the HAA to save it in case it is necessary once again and for safety reasons (since people often try to hack into systems using this account).  Do NOT use the HAA as your administrator account because if you lose the only administrator on the system account or it is damaged again, then you're watered.

    The fact that it says it is disabled gives me to think that you can use the guest or built-in Administrator account already (as normally, you cannot disable an account, but you can with these two which cannot be deleted and only disabled).

    The password reset disk is only good if created before that you need and only to restore a password, do not to activate a disabled account.  Another thing that goes beyond passwords here.

    A recovery disk allows you to do some advanced options of recovery by booting the disk, but it will help you restore the operating system (or help you with this problem either).

    An Installation of Vista genuinve disc (the operating system drive as you seem to be describing) is a disk that contains the operating system.  That, if it is the original disc supplied with the system and is exactly the same as the product OEM key that you must allow you to do a clean OS install (although I would be first backup you'll pretty much lost everything in the process).  The following should help: http://www.vistax64.com/tutorials/117366-clean-install-full-version-vista.html.

    If you have a factory Conditions or a recovery Partition restore disk, then these are alternatives to a clean install if you don't have this disc.  But the procedure varies according to the manufacturer, make and model of PC.  Most of the manufacturers will allow you to buy these records of restoration (for a fee) If you cannot do it with a recovery Partition cannot create diskettes from the recovery Partition or have no other option.  Visit the support site of the computer for information on this topic, available options, and related costs.

    If you cannot enable the built-in Administrator account and cannot access the system in normal mode with this or another administrator account, then I'm afraid a clean install or restore to factory conditions is your only option.

    I hope this helps.

    Good luck!

Maybe you are looking for