Please visit

http://www.cuteework.com/members.php

Login button not work. here is members.php file details.

<?php
  session_start();
  session_register("id_session");
  session_register("password_session");
include "header.php";
include "config.php";
$a="";
$b="";
if ($_POST) {
    $a=trim($_POST["id"]);
    $b=trim($_POST["password"]);
    $a=str_replace("'","",$a);
    $b=str_replace("'","",$b);
    $a=str_replace("\"","",$a);
    $b=str_replace("\"","",$b);
}
if ($a=="" || $b=="")
{

  if ($_SESSION["id_session"]=="" || $_SESSION["password_session"]=="")
  {

?>
            <form action=members.php method=post>

<br><br><Center><table><tr><td colspan=2 align=center><h3>Members Login Area</h3></td></tr>
<tr><td>Member's ID</td><td><input type=text name=id></td></tr>
<tr><td>Password</td><td><input type=password name=password></td></tr>
<tr><td> </td><td>
<a href="forgot.php" onclick="doexit=false;"><font face="Verdana,Arial,Helvetica" size="1" color="#000000"><b>Forgot Your Password?</b></font></a></td></tr>
<tr><td colspan=2 align=center><input type=submit value="Log In"></td></tr>          
</table></form>


<?
  }
  else
  {
  middle();
  }
}
else
{
$check=0;

$id=$_POST["id"];
$rs = mysql_query("select * from members where ID='$id'");

if ($rs) {
$arr=mysql_fetch_array($rs);
    $n2=$arr['Password'];
    if ($n2==$b) {
        $check=1;
        $_SESSION["id_session"]=$arr[0];
        $_SESSION["password_session"]=$arr[9];
        middle();
    }
}
if ($check==0)
{
  print "<h2>Invalid User Id or Password</h2>";
?>
            <form action=members.php method=post>

<br><br><Center><table><tr><td colspan=2 align=center><h3>Members Login Area</h3></td></tr>
<tr><td>Member's ID</td><td><input type=text name=id></td></tr>
<tr><td>Password</td><td><input type=password name=password></td></tr>
<tr><td> </td><td>
<a href="forgot.php" onclick="doexit=false;"><font face="Verdana,Arial,Helvetica" size="1" color="#000000"><b>Forgot Your Password?</b></font></a></td></tr>
<tr><td colspan=2 align=center><input type=submit value="Log In"></td></tr>          
</table></form>
<? 
} 
}

function middle()
{
    $id=$_SESSION["id_session"];
    $rs = mysql_query("select * from members where ID=$id");
    $arr=mysql_fetch_array($rs);
    $check=1;
    $id=$arr[0];
    $password=$arr[9];
        $name=$arr[1];
        $address=$arr[2];
    $city=$arr[3];
    $state=$arr[4];
    $zip=$arr[5];
    $country=$arr[6];
    $phone=$arr[7];
    $email=$arr[8];
    $password=$b;
    $paymentoption=$arr[10];
    $refby=$arr[11];
    $l1=$arr[12];
    $l2=$arr[13];
    $l3=$arr[14];
    $l4=$arr[15];
    $l5=$arr[16];
    $l6=$arr[17];
    $l7=$arr[18];
    $l8=$arr[19];
    $l9=$arr[20];
    $l10=$arr[21];
    $leader=$arr[22];
    $total=$arr[23];
    $unpaid=$arr[24];
    $paid=$arr[25];

?>
 <table border="0" width="650">
   <tr>
   <td width="150" valign="top">
     <table width="140">
     <tr>
       <td align="left"><br><br><br><br>
        <ul><font face="verdana" size="1">
            <a href="stats.php">Statistics</a><br><br>
            <a href="update_pf.php">Edit Personal Information</a><br><br>
            <a href="sample_e.php">Referral Code & Links</a><br><br>
                    <a href="logout.php">Logout</a><br><br>
    </td></tr></table>
     </td>
     <td VALIGN="top">
     <table>
        <tr> 
            <td>
            <font face="verdana" size="3"><b>
            <p>Account Center</b></font></p>
<br>
</td> 
</tr>
<tr>
<td>

        <div align="center">
        <table border="0" cellpadding="3" cellspacing="0" width="400">

              <tr> 
                <td colspan="2"><b>
                 <hr><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><center> Account Details for <?echo $name;?></font></center></b><hr>
                </td>
              </tr>
              <tr> 
                <td valign="center" align="left"><strong><font face="Verdana" size="-1">Total Commisions Earned: </font></strong><br></td>
                <td valign="center"> <font face="Verdana" size="-1">$<? echo $total;?></font><br></td>
              </tr>
              <tr> 
                <td valign="center" align="left"><strong><font face="Verdana" size="-1">Commisions Due: </font></strong><br></td>
                <td valign="center"> <font face="Verdana" size="-1">$<? echo $unpaid;?></font><br></td>
              </tr>
              <tr> 
                <td valign="center" align="left"><strong><font face="Verdana" size="-1">Commisions Paid: </font></strong><br></td>
                <td valign="center"> <font face="Verdana" size="-1">$<? echo $paid;?></font><br></td>
              </tr>
              <tr> 
                <td valign="center" align="left" colspan=2> </td>
              </tr>
              <tr> 
                <td valign="center" align="left"><strong><font face="Verdana" size="-1">Direct Referrals: </font></strong><br></td>
                <td valign="center"> <font face="Verdana" size="-1"><?
$rsd=mysql_query("select * from members where Leader=".$id);
 echo mysql_num_rows($rsd); ?></font><br></td>
              </tr>
              <tr> 
                <td valign="center" align="left" colspan=2> </td>
              </tr>
              <tr> 
                <td valign="center" align="left" colspan=2><strong><font face="Verdana" size="3">Downline Information </font></strong><br></td>
              </tr>

              <tr> 
                <td valign="center" align="left"><strong><font face="Verdana" size="-1">Total Downline Size: </font></strong><br></td>
                <td valign="center"> <font face="Verdana" size="-1"><?     echo ($l1+$l2+$l3+$l4+$l5+$l6+$l7+$l8+$l9+$l10); ?></font><br></td>
              </tr>
            <tr><td colspan=2>

            <Table width=100%>
            <tr><td bgcolor=#000000><strong><font face="Verdana" size="-1" color=#ffffff>Level</font></strong></td>
            <td bgcolor=#000000><strong><font face="Verdana" size="-1" color=#ffffff>Number of Members</font></strong></td>   </tr>
<? include "config.php"; ?>
            <? for($i=1;$i<=$levels;$i++) { ?>
            <tr><td><strong><font face="Verdana" size="-1"><? echo $i; ?></font></strong></td>
            <td ><font face="Verdana" size="-1">
            <?
            if($i==1) {
                echo $l1; 
            }
            elseif($i==2) {
                echo $l2; 
            }
            elseif($i==3) {
                echo $l3; 
            }
            elseif($i==4) {
                echo $l4; 
            }
            elseif($i==5) {
                echo $l5; 
            }
            elseif($i==6) {
                echo $l6; 
            }
            elseif($i==7) {
                echo $l7; 
            }
            elseif($i==8) {
                echo $l8; 
            }
            elseif($i==9) {
                echo $l9; 
            }
            elseif($i==10) {
                echo $l10; 
            }
            ?>
            </font></td>  </tr>
            <? } ?>
            </table>
            </td></tr>
              <tr><td colspan=4><hr></td><tr>
             </table>
            </div>

            </td>
        </tr>

    </table>
            <font face="verdana" size="3"><b>
            <p>Download Center</b></font></p>

<?
include "download.php";
?>
  </td>
  </tr>
</table>
<br><br>
<?
}
include "footer.php";
?>

Heartly Request to solve this problem......... thanks in advance....

Recommended Answers

All 17 Replies

Member Avatar for LastMitch

Login button not work. here is members.php file details.

Next time, please post your errors too.

I don't like clicking links.

So in the future just post the code with errors or try to post the image of the errors with the code.

This is your error on line 42:

Parse error: syntax error, unexpected '}' in /home/cutework/public_html/config.php on line 42

Did you write this code?

If so, why did you put an extra bracket for?

Take it out.

New Person make mistake ....... Thanks...

No Sir, Iam not write any code. This ')' made by mistake because i am delete this sign '(' in starting time.

I am reupload all files without touching anything.

When i install script i get SQL query error i get this line error .. Line 13

<?php
// Provide Values for Database
$dbhost="localhost";
$dbname="xxxxxxxxx";
$dbuser="xxxxxxxxx";
$dbpass="xxxxxxxxxx";

//Don't change the below 2 lines
  $dbconnect=mysql_connect($dbhost,$dbuser,$dbpass);
  mysql_select_db($dbname);

$rs=mysql_query("select * from adminsettings");
if(mysql_num_rows($rs)>0) {
$arr=mysql_fetch_array($rs);
$sitename=$arr[0];
$siteurl=$arr[1];
$webmasteremail=$arr[2];
$adminpass=$arr[3];

$alertpay=$arr[4];
$Inpays=$arr[5];
$Sfipay=$arr[6];

$fee=$arr[7];

$levels=$arr[8];

$level1=$arr[9];
$level2=$arr[10];
$level3=$arr[11];
$level4=$arr[12];
$level5=$arr[13];
$level6=$arr[14];
$level7=$arr[15];
$level8=$arr[16];
$level9=$arr[17];
$level10=$arr[18];

$forcedmatrix=$arr[19];
$membershipperiod=$arr[20];
$signupbonus=$arr[21];
}
?>

this is my config.php file. Thank you very much sir.

Member Avatar for LastMitch

When i install script i get SQL query error i get this line error .. Line 13

There's something wrong with this:

$rs=mysql_query("select * from adminsettings");

It's not connected you need to connected the database to the column adminsettings in order to work.

Check to line 9 and line 10 to see is it connected or not:

$dbconnect=mysql_connect($dbhost,$dbuser,$dbpass);
mysql_select_db($dbname);

Add this: ie ('Could not connect to mysql server.'); and this or die('Could not select database.'); to the end of these statement:

$dbconnect=mysql_connect($dbhost,$dbuser,$dbpass) die ('Could not connect to mysql server.');
mysql_select_db($dbconnect, $dbname) or die('Could not select database.');

Then run the code again. It will tell you whether it's connected or not to your database.

I'm have a bad hunch that if you fixed this issue then there will be another issue with another file and you will post the code with another error.

This is not good at all.

It's like I'm helping you do debugged code for each file you post.

its show error

Parse error: syntax error, unexpected T_EXIT in /home/cutework/public_html/config.php on line 9

can you give me your email.... i want to send you something matter personal..... Thanks or you send me email to anurag.shree2100@gmail.com
iam waiting, thanks

Member Avatar for LastMitch

can you give me your email.... i want to send you something matter personal..... Thanks or you send me email to anurag.shree2100@gmail.com

If you have any questions/issue with your code. Then you need to put it here.

I don't email any members.

if this site run, our NGO run.... i am reply to you ..... error report. thanks sir

Member Avatar for LastMitch
Parse error: syntax error, unexpected T_EXIT in /home/cutework/public_html/config.php on line 9

Try this again ( I think I forgot to put or in the statement ):

$dbconnect=mysql_connect($dbhost,$dbuser,$dbpass) or die ('Could not connect to mysql server.');
mysql_select_db($dbconnect, $dbname) or die ('Could not select database.');

There's should be any issue with the query on line 9.

Not Work, then i am reupload default config.php file....... If i am change admin setting .... front page change value ..... you see this time its work ....... but /members.php .... login button not work example user id - 1 pass : anurashmi ....... request to check log in button not work. heartly thanks

Member Avatar for LastMitch

There's should be any issue with the query on line 9.

I mistype my quote. It should said

There's shouldn't be any issue with the query on line 9.

not

There's should be any issue with the query on line 9.

Not Work, then i am reupload default config.php file....... If i am change admin setting .... front page change value ..... you see this time its work ....... but /members.php .... login button not work example user id - 1 pass : anurashmi ....... request to check log in button not work. heartly thanks

What are you talking about?

What is in the admin setting?

You can't expect me to read your mind you have to explain clearly what doesn't work.

Which line does the error appear?

Resp. sir,

http://www.cuteework.com/members.php

here i am submit user id 1 & pass anurashmi & try to click log in button ..... its not work. few expert say SQL ver reason this script not work. i am not sure. but i feel something wrong . this reason i am here. great help from your side. thanks. but issue still not solved.... "log in button" not work

Member Avatar for LastMitch

its not work. few expert say SQL ver reason this script not work. i am not sure. but i feel something wrong . this reason i am here. great help from your side. thanks. but issue still not solved.... "log in button" not work\

Why didn't you put qoutes " " in the <input> tags?

From this line-27, line-28, line-31:

<input type=text name=id>
<input type=password name=password>
<input type=submit value="Log In">

to this line-27, line-28, line-31:

<input type="text" name="id">
<input type="password" name="password">
<input type="submit" value="Log In">

I mention to you that I don't like to click links.

Are you still getting this error:

Parse error: syntax error, unexpected T_EXIT in /home/cutework/public_html/config.php on line 9

You never mention it was solve or not?

There was no error from the link? Why can't you post the error?

This is the last time I will mention this I don't like to click links to see check the codes on any websites.

If you want me to help you then you really need to post the error because I'm not going to go back and forward from the link and see what is wrong with your code.

Member Avatar for diafol

Posting a link to a failing login script will rarely elucidate the problem. In addition, posting the live site which shows errors, may lay you open to security breaches as info is displayed for all to see.

I don't want to sound critical, but your code and markup look like something out of the early 1990's - table-based layout and mixed php/html/inline js/font face/align.

Before tackling 'code' (js, php), I suggest that you study HTML and CSS and check which tags are deprecated. You'll find that this will help you streamline your markup. The js should be taken out of inline statements, further cleaning your markup. The majority of the php could also be taken out and placed above the Doctype Declaration.

Of course, this won't address your issue with the sql query. If you follow LM's suggestion with the die() statement, it should tell you where the problem lies if you modify it slightly:

$result = mysql_query('SELECT * WHERE 1=1');
if (!$result) {
    die('Invalid query: ' . mysql_error());
}

That's a variation.

Nothing Work Fine. Still Error coming ....... i want to provide you full script. rar file. you check what is problem .... Sir Lastmitch ... Script developer running site view source indicate "" is not important . his site members.php file not included with "" for text, submit etc word.
i am wait too long, site not work. this reason i offer to you please solve this problem cobrascript owner cheat me he get 29$ & give me this error base script. thanks & sorry if i hurt you.

[07-Mar-2013 16:11:09] PHP Parse error:  syntax error, unexpected T_EXIT in /home/xxxxxxx/public_html/config.php on line 9
[07-Mar-2013 16:21:40] PHP Parse error:  syntax error, unexpected T_EXIT in /home/xxxxxxx/public_html/config.php on line 9
[07-Mar-2013 19:04:54] PHP Parse error:  syntax error, unexpected T_EXIT in /home/xxxxxxx/public_html/config.php on line 9
[07-Mar-2013 19:27:30] PHP Parse error:  syntax error, unexpected T_EXIT in /home/xxxxxxx/public_html/config.php on line 9
[07-Mar-2013 19:27:34] PHP Parse error:  syntax error, unexpected T_EXIT in /home/xxxxxxx/public_html/config.php on line 9
[08-Mar-2013 19:22:19] PHP Parse error:  syntax error, unexpected T_EXIT in /home/xxxxxxx/public_html/config.php on line 9
[09-Mar-2013 00:29:00] PHP Parse error:  syntax error, unexpected T_EXIT in /home/xxxxxxx/public_html/config.php on line 9
[09-Mar-2013 03:57:03] PHP Warning:  mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/xxxxxxx/public_html/config.php on line 10
[09-Mar-2013 03:57:08] PHP Warning:  mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/xxxxxxx/public_html/config.php on line 10
[09-Mar-2013 03:57:09] PHP Warning:  mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/xxxxxxx/public_html/config.php on line 10
[09-Mar-2013 03:57:32] PHP Warning:  mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/xxxxxxx/public_html/config.php on line 10
[09-Mar-2013 03:58:20] PHP Parse error:  syntax error, unexpected T_LOGICAL_OR in /home/xxxxxxx/public_html/config.php on line 9
[09-Mar-2013 03:59:00] PHP Warning:  mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/xxxxxxx/public_html/config.php on line 10
[09-Mar-2013 03:59:00] PHP Warning:  mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/xxxxxxx/public_html/config.php on line 13
[09-Mar-2013 03:59:00] PHP Warning:  mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/xxxxxxx/public_html/config.php on line 10
[09-Mar-2013 03:59:00] PHP Warning:  mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/xxxxxxx/public_html/config.php on line 13
[09-Mar-2013 03:59:00] PHP Warning:  mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/xxxxxxx/public_html/config.php on line 10
[09-Mar-2013 03:59:00] PHP Warning:  mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/xxxxxxx/public_html/config.php on line 13
[09-Mar-2013 03:59:55] PHP Fatal error:  Function name must be a string in /home/xxxxxxx/public_html/config.php on line 10
[09-Mar-2013 03:59:57] PHP Fatal error:  Function name must be a string in /home/xxxxxxx/public_html/config.php on line 10
[09-Mar-2013 18:49:28] PHP Warning:  mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/xxxxxxx/public_html/config.php on line 13
[09-Mar-2013 18:49:28] PHP Warning:  mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/xxxxxxx/public_html/config.php on line 13
[09-Mar-2013 18:49:28] PHP Warning:  mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/xxxxxxx/public_html/config.php on line 13

This is my error log file details

Member Avatar for LastMitch

i am wait too long, site not work. this reason i offer to you please solve this problem cobrascript owner cheat me he get 29$ & give me this error base script. thanks & sorry if i hurt you

You didn't offend me or hurt my feelings. The issue is that you didn't do what I ask you to do.

You are still having this issue:

[07-Mar-2013 16:11:09] PHP Parse error: syntax error, unexpected T_EXIT in /home/xxxxxxx/public_html/config.php on line 9

Did you try this (at all):

$dbconnect=mysql_connect($dbhost,$dbuser,$dbpass) or die ('Could not connect to mysql server.');
mysql_select_db($dbconnect, $dbname) or die ('Could not select database.');

The error you have is related to this.

[10-Mar-2013 04:54:17] PHP Warning:  mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/cutework/public_html/config.php on line 10

error still coming

I am delete this site........ third class script

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.