+ Reply to Thread
Page 1 of 4 123 ... LastLast
Results 1 to 10 of 32

Thread: Please help -myphpadmin

  1. #1
    tigra123 is offline x10Hosting Member tigra123 is an unknown quantity at this point
    Join Date
    Jul 2009
    Posts
    19

    Unhappy Please help -myphpadmin

    Hi There,

    I have recently moved an old dynamic website to x10hosting. Created all the tables again in myphpadmin. Problem is that I cant get members to join/register on my website nor can I log into my website even though I have added my record details to table.
    No errors are reported.
    The register/join page on web site simply reloads itself after form has been filled in for new member to join.
    What is going wrong ?- do I not have permissions ?or is it more likely a PHP coding problem. Any help appreciated!!

  2. #2
    Submariner is offline x10Hosting Member Submariner is an unknown quantity at this point
    Join Date
    Dec 2007
    Location
    TN, USA
    Posts
    44

    Re: Please help -myphpadmin

    More information is needed, like the PHP you are using to process the page and maybe a link to the site itself...

  3. #3
    taha116's Avatar
    taha116 is offline x10 Lieutenant taha116 is an unknown quantity at this point
    Join Date
    Nov 2007
    Posts
    497

    Re: Please help -myphpadmin

    Ok firstly make sure you corrected all your config files like database username may have been "taha_admin" now it might be "tigra123_admin"

    make sure that you import the database by creating a table with the same name and going to your original phpmyadmin page and pressing export.. press go and copy all the code it gives you and run it in the "SQL" section of your database that you created.

    Basicly correct your settings for stuff like database paths passwrods etc.. whatever else changed besides hosts is important


    Need help with starting up your website? No problemo PM if you need help, if you want help with scripts like WordPress, SMF and so on dont be afraid to PM for that too.


  4. #4
    tigra123 is offline x10Hosting Member tigra123 is an unknown quantity at this point
    Join Date
    Jul 2009
    Posts
    19

    Re: Please help -myphpadmin

    still no joy. All path names correct and user names correct.
    Could it be that all the SQL quieries are in the php files that are in the CP? I havnt done any quieries directly in myphpadmin? forgive me but Iam not an expert at this!

  5. #5
    trev's Avatar
    trev is offline x10 Lieutenant trev is an unknown quantity at this point
    Join Date
    Feb 2005
    Location
    Guildford
    Posts
    334

    Re: Please help -myphpadmin

    Are the PHP files running with the correct CHMod 755?
    :ughdance: ::Trev Is back:: :ughdance:
    X10Hosting is the best free host ever

  6. #6
    tigra123 is offline x10Hosting Member tigra123 is an unknown quantity at this point
    Join Date
    Jul 2009
    Posts
    19

    Re: Please help -myphpadmin

    hi, how can I check CHMod 755? I dont know what it is,

    many thanks!

  7. #7
    trev's Avatar
    trev is offline x10 Lieutenant trev is an unknown quantity at this point
    Join Date
    Feb 2005
    Location
    Guildford
    Posts
    334

    Re: Please help -myphpadmin

    Its the permissions on the files, either using an FTP client or using the file manager you need to edit the permissions of any file that needs to be executed.
    :ughdance: ::Trev Is back:: :ughdance:
    X10Hosting is the best free host ever

  8. #8
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: Please help -myphpadmin

    cPanel Tutorial: Files - File Permissions, but PHP scripts don't need to have execute permission. The minimum mode is 0600, giving the owner read permission and nothing else.

    Please post a minimal test case and a link to a live sample. It's very hard to answer questions about code without seeing it.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  9. #9
    tigra123 is offline x10Hosting Member tigra123 is an unknown quantity at this point
    Join Date
    Jul 2009
    Posts
    19

    Re: Please help -myphpadmin

    I have changed the permissions and it still doesnt work:dunno:
    Edit:
    here is the code for authorising a user to login. Since my details are entered into table row, I should be able to login from the website right?

    <?php
    include_once("config.php");

    //Check for required fields from the form
    if ((!$_POST[email]) || (!$_POST[password]))
    {
    header("Location: ../login.php");
    exit;
    }
    //Connect to server
    $conn = mysql_connect("localhost","$username","$password") or die(mysql_error());
    //Select database
    mysql_select_db("$database",$conn) or die(mysql_error());
    //Create the query
    $sql = "
    select * from members
    where
    email = '$_POST[email]' AND password = password('$_POST[password]') AND status = '1'";
    //Issue query
    $result = mysql_query($sql,$conn) or die(mysql_error());
    //Check the number of return rows
    if (mysql_num_rows($result) == 1)
    {
    session_start();
    $_SESSION[auth] = "1";
    $_SESSION[id] = mysql_result($result, 0, 'id');
    $_SESSION[fname] = mysql_result($result, 0, 'f_name');
    $_SESSION[sname] = mysql_result($result, 0, 'l_name');
    $_SESSION[user_email] = mysql_result($result, 0, 'email');
    header("Location: ../index.php");
    }
    else
    {
    header("Location: ../login_error.php");
    }

    ?>

    many thanks for looking
    Last edited by tigra123; 07-28-2009 at 06:39 AM. Reason: Automerged Doublepost

  10. #10
    zapzack is offline x10 Elder zapzack is an unknown quantity at this point
    Join Date
    Jul 2009
    Posts
    606

    Re: Please help -myphpadmin

    Heh.. This one's simple..

    Code:
    <?php 
    include_once("config.php");
    
    //Check for required fields from the form
    if ((!$_POST[email]) || (!$_POST[password]))
    {
    header("Location: ../login.php");
    exit;
    }
    //Connect to server
    $conn = mysql_connect("localhost", $username, $password) or die(mysql_error());
    //Select database
    mysql_select_db($database,$conn) or die(mysql_error());
    //Create the query
    $sql = "
    select * from members
    where
    email = '$_POST[email]' AND password = password('$_POST[password]') AND status = '1'";
    //Issue query
    $result = mysql_query($sql,$conn) or die(mysql_error());
    //Check the number of return rows
    if (mysql_num_rows($result) == 1)
    {
    session_start();
    $_SESSION[auth] = "1";
    $_SESSION[id] = mysql_result($result, 0, 'id');
    $_SESSION[fname] = mysql_result($result, 0, 'f_name');
    $_SESSION[sname] = mysql_result($result, 0, 'l_name');
    $_SESSION[user_email] = mysql_result($result, 0, 'email');
    header("Location: ../index.php");
    }
    else
    {
    header("Location: ../login_error.php");
    }
    
    ?>
    No quotes around variables.. try it now.. And if there are any errors, post them..

+ Reply to Thread
Page 1 of 4 123 ... LastLast

Similar Threads

  1. Error message when trying t access my myphpadmin
    By anilson1 in forum Free Hosting
    Replies: 0
    Last Post: 05-31-2008, 09:19 PM
  2. Can,t access myphpadmin
    By madzzkill in forum Free Hosting
    Replies: 1
    Last Post: 05-29-2008, 03:31 PM
  3. Myphpadmin error?
    By salukigirl in forum Programming Help
    Replies: 6
    Last Post: 12-28-2007, 06:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers