www.webdeveloper.com
Results 1 to 6 of 6

Thread: Password with a period

  1. #1
    Join Date
    Dec 2010
    Posts
    59

    Password with a period

    quick question, this is probably stupid, I have a wordpress site I am working on, but on the front page, I want content from multiple plugins in the database to build a custom home page that has content from multiple plugins displayed on the front page.

    to do a simple connect, my password contains a period in it. PHP seems to get screwed up with that period. I tried both single quotes and double quotes, anyone know how to get around this problem I am having?
    MY BLOG:
    HTML Code:
    <a href="http://teststuff.freehostingcloud.com">click here to read my game progress</a>

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    18,924
    Are you talking about the main WordPress login, or something else? If "something else," we'll need to see the relevant code to help you figure out what's wrong.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  3. #3
    Join Date
    Dec 2010
    Posts
    59
    Here is an example. lets say my username is admin, and password is pass.word.

    mysql_connect('localhost', 'admin', 'pass.word');
    AFter the '.' in pass.word it won't do anything past that. Any way of getting past this without actually having to make changes to the db?
    MY BLOG:
    HTML Code:
    <a href="http://teststuff.freehostingcloud.com">click here to read my game progress</a>

  4. #4
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    18,924
    Okay, so you are trying to submit that as the MySQL password for MySQL user named "admin". Does your MySQL installation on that host in fact have a user defined with that name and password, and if so, how did you create it?
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  5. #5
    Join Date
    Dec 2010
    Posts
    59
    Yes eveything is correct. Even if I dnt do a query it won't echo that there is a connection or not like I told it to
    MY BLOG:
    HTML Code:
    <a href="http://teststuff.freehostingcloud.com">click here to read my game progress</a>

  6. #6
    Join Date
    Dec 2010
    Posts
    59
    I figured out in wordpress, you don't have to sign into database with php, you can just get it by using $wpdb.

    Another problem arises though, for some reason when writing a query, I either just get a count or I get a result with a bunch of extra stuff from the query like the column name and table name and what not. here is the code I put in that is only giving me a count. I also tried echo, but echo won't give me any results at all.

    global $wpdb;

    $myrows = $wpdb->query( "SELECT * FROM wp_users WHERE display_name='pdiddledor';" );
    var_dump($myrows);
    MY BLOG:
    HTML Code:
    <a href="http://teststuff.freehostingcloud.com">click here to read my game progress</a>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles