Jump to content

foevah

Members
  • Posts

    162
  • Joined

  • Last visited

    Never

Everything posted by foevah

  1. [quote author=Crayon Violent link=topic=113954.msg463512#msg463512 date=1162800071] okay so i went to the tutorial link you provided and they have user/pass authentication using a database.  If you had followed the tutorial all you would have had to do is add more rows to your database table with usernames/passwords and the script would automatically be multi-user compatible. [/quote] Ive been following the tutorials closely. What tutorials does it explain how to add more rows to my database with usernames/passwords? I havent gone much further then part 4 of the tutorials because im wondering why I can only get one user name and password to work. [url=http://codegrrl.com/!/tutorials/view/part_4_passwording_individual_entries/]click here to view part 4[/url] Ok i added the code alpine posted to my journal.php page and nothing worked.. I then saved it as a seperate page called userpass.php with just this code in below and it didnt respond to the journal.php [url=http://www.webdesignhull.lincoln.ac.uk/jecgardner/mpr/display_blog.php]CLICK HERE TO SEE THE PAGE[/url] [quote author=alpine link=topic=113954.msg463495#msg463495 date=1162796419] [code] <?php $data = array("Harry"=>"7467hg","John"=>"84748hfd","Alice"=>"83rswg77"); $valid = 0; foreach($data as $user => $pass) {   if($user == $_POST['username'] && $pass == $_POST['password'])   {     // We have a match     $valid = 1;     break;   } } if($valid == 1) {   // user stuff } else {   // No match in login } ?> [/code] [/quote] Im still a bit lost please help to make things clearer!
  2. The tutorial hasnt told me to store usernames and passwords in a database it just said add it to the individual entry page. I added $my_username = "USERNAME"; $my_password = "PASSWORD"; I changed the username to test and password to test this works fine which you can see [url=http://www.webdesignhull.lincoln.ac.uk/jecgardner/mpr/display_blog.php]here[/url] I can password an entry but I was wondering can I add more then one username to this? click [url=http://www.webdesignhull.lincoln.ac.uk/jecgardner/mpr/blog_entry_form.php]here[/url] to see the submit form Any ideas why it doesnt say sorry password is wrong??
  3. Hi im trying to build a blog using a site this forum recommends but im having difficulty getting accurate results Heres a link to the blog tutorial im questioning [url=http://codegrrl.com/!/tutorials/view/part_4_passwording_individual_entries/]passwording individual entries tutorial[/url] It says add this to the individual entry page which can be viewed [url=http://www.webdesignhull.lincoln.ac.uk/jecgardner/mpr/display_blog.php]here[/url] $my_username = "USERNAME"; $my_password = "PASSWORD"; the username and password is currently test:test I was wondering how can I add multiple logins and passwords? would it look something like this: $my_username2 = "HARRY"; $my_password2 = "HAR"; $my_username3 = "LARRY"; $my_password3 = "LAR"; Then further down the script theres this: if ($password == 1) {         if (isset($_POST['username']) && $_POST['username'] == $my_username) {             if (isset($_POST['pass']) && $_POST['pass'] == $my_password) {                 ?>                 <p><strong><?php echo $title; ?></strong><br /><br />                 <?php echo $entry; ?><br /><br />                 Posted on <?php echo $date; ?></p>                 <?php             }             else { ?>                 <p>Sorry, wrong password.</p> I pasted this code again and changed password == 1 to password == 2 hoping it would work with the new usernames and passwords I made.. Please can someone tell me what im doing wrong!? Also when you enter the wrong password in it doesnt say Sorry, wrong password.. Why is this??? Please help!!
  4. Hi i need to buy a site with ability to read php and mysql.. Last time i bought a domain name the service didnt provide php and mysql.. Can someone please tell me the best place to buy the essentials from or even a free site to get me started!!!
  5. i know some basics of php.. ebay was an example. I need to make an online store thats secure.. Any advice please?
  6. Hi people im new to php and mysql. I need to know the best way to approach making an online store. Please can someone direct me in the right way!?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.