Jump to content

help newbie with php


elmirod

Recommended Posts

hello im working on a site and its my 1st php experience i was wondering if it was poassible to get some help
basicly what happen is some sort of date site but my engine gets some wierd error.
Once you get on the page u see a serch section when u use it and then use back that include is gone
so its like the index has 3 include in it and the 2nd one is not loading back
the only i m getting it back is if i clear my browser cache
id have no idea on how yto fix this
anyone can give me a hand?

Link to comment
https://forums.phpfreaks.com/topic/32899-help-newbie-with-php/
Share on other sites

well its a french dating site theuu well i know really know how to post the code but
here is the index
----------------------------
[code]<!--
body {
background-image: url(back.gif);
}
-->
</style><?
    require "engine/load_configuration.pml";
    require "engine/scheduler.pml";
   
    $timestamp=time();
    $timeout=$timestamp-$timeoutseconds;
    $db = c();
if($action == order && order_n != "")
{

include "engine/card_process.pml";

if($payment_status == success)
{
$page = payment_success;
}
else
{
$page = payment_failed;
}
}

include "engine/login_pages.pml";

//  Locating current page

if($page == logout)
{
        q("DELETE FROM dt_usersonline WHERE userid='$sAuth'");
$page = index;
$sAuth = "";

setcookie("sAuth");
}

if(IsRequiredLogin($page) && $sAuth == "")
{
$page = sign_in;
}

if(!isset($page) && !isset($current_page))
{
$current_page = index;
}

if(!empty($page))
{
setcookie("current_page", $page);
$current_page = $page;
}



$logged_in = 0;

// Handling actions

if($action == login)
{
if($login == "" || $pswd == "")
{
$error = "Invalid username or password entered!";
}
else
{
$fMember = f(q("select * from dt_members where login='$login' and pswd='$pswd'"));

if($fMember[ id ] == "")
{
$error = "No such user in the database!";
}
else
{
setcookie("sAuth", $fMember[ id ]);
$sAuth = $fMember[ id ];

$logged_in = 1;
                                q("UPDATE dt_profile set lastlogin=".time()." WHERE member_id=".$fMember[id]);
}
}
}

if(!$logged_in && isset($sAuth))
{
$fMember = f(q("select * from dt_members where id='$sAuth'"));

if($fMember[ id ] == "")
{
setcookie("sAuth");
}
else
{
$logged_in = 1;
}
}

// EOF Handling actions

if($current_page == sign_in && $logged_in)
{
$current_page = members_area;
}

session_start();
    $ses_id = session_id();
if($logged_in)
{
$member_code = sysGetProfileCode();

                $fExists = f(q("SELECT id from dt_usersonline where session_id='$ses_id'"));
                if ($fExists[id] == "")
                {
                  q("INSERT INTO dt_usersonline (timestamp, ip, login, userid, session_id) VALUES ($timestamp,'$REMOTE_ADDR','$fMember[login]', $fMember[id], '$ses_id')");
                }
                else
                {
                  q("UPDATE dt_usersonline set timestamp=$timestamp, login = '$fMember[login]', userid = $fMember[id] where session_id='$ses_id'");
                }
    }
    else
    {
                $fExists = f(q("SELECT id from dt_usersonline where session_id='$ses_id'"));
                if ($fExists[id] == "")
                {
                  q("INSERT INTO dt_usersonline (timestamp, ip, login, session_id) VALUES ($timestamp,'$REMOTE_ADDR','', '$ses_id')");
                }
                else
                {
                  q("UPDATE dt_usersonline set timestamp=$timestamp where session_id='$ses_id'");
                }
    }
    q("DELETE FROM dt_usersonline WHERE (timestamp<$timeout)");
    $rUsers = q("select * from dt_usersonline where (login <> '')and(timestamp>$timeout)");
    $registeredon = (int)nr($rUsers);
    $f = 0;
    $rusers = "";
while($fUsers = f($rUsers))
{
              if ($f == 0)
              {
              $rusers = '<a href="index.php?page=view_profile&id='.$fUsers[userid].'">'.$fUsers[login].'</a>';
              $f = 1;
              }
              else
              {
              $rusers .= ', <a href="index.php?page=view_profile&id='.$fUsers[userid].'">'.$fUsers[login].'</a>';
              }
    }
    $rUsers = q("select * from dt_usersonline where (login = '')and(timestamp>$timeout)");
    $guestson = (int)nr($rUsers);

include "top.html";
include "engine/pages/$current_page.pml";
    include "bottom.html";

d($db);
?>

<!--
body {
background-image: url(back.gif);
}
-->
</style><?
    require "engine/load_configuration.pml";
    require "engine/scheduler.pml";
   
    $timestamp=time();
    $timeout=$timestamp-$timeoutseconds;
    $db = c();
if($action == order && order_n != "")
{

include "engine/card_process.pml";

if($payment_status == success)
{
$page = payment_success;
}
else
{
$page = payment_failed;
}
}

include "engine/login_pages.pml";

//  Locating current page

if($page == logout)
{
        q("DELETE FROM dt_usersonline WHERE userid='$sAuth'");
$page = index;
$sAuth = "";

setcookie("sAuth");
}

if(IsRequiredLogin($page) && $sAuth == "")
{
$page = sign_in;
}

if(!isset($page) && !isset($current_page))
{
$current_page = index;
}

if(!empty($page))
{
setcookie("current_page", $page);
$current_page = $page;
}



$logged_in = 0;

// Handling actions

if($action == login)
{
if($login == "" || $pswd == "")
{
$error = "Invalid username or password entered!";
}
else
{
$fMember = f(q("select * from dt_members where login='$login' and pswd='$pswd'"));

if($fMember[ id ] == "")
{
$error = "No such user in the database!";
}
else
{
setcookie("sAuth", $fMember[ id ]);
$sAuth = $fMember[ id ];

$logged_in = 1;
                                q("UPDATE dt_profile set lastlogin=".time()." WHERE member_id=".$fMember[id]);
}
}
}

if(!$logged_in && isset($sAuth))
{
$fMember = f(q("select * from dt_members where id='$sAuth'"));

if($fMember[ id ] == "")
{
setcookie("sAuth");
}
else
{
$logged_in = 1;
}
}

// EOF Handling actions

if($current_page == sign_in && $logged_in)
{
$current_page = members_area;
}

session_start();
    $ses_id = session_id();
if($logged_in)
{
$member_code = sysGetProfileCode();

                $fExists = f(q("SELECT id from dt_usersonline where session_id='$ses_id'"));
                if ($fExists[id] == "")
                {
                  q("INSERT INTO dt_usersonline (timestamp, ip, login, userid, session_id) VALUES ($timestamp,'$REMOTE_ADDR','$fMember[login]', $fMember[id], '$ses_id')");
                }
                else
                {
                  q("UPDATE dt_usersonline set timestamp=$timestamp, login = '$fMember[login]', userid = $fMember[id] where session_id='$ses_id'");
                }
    }
    else
    {
                $fExists = f(q("SELECT id from dt_usersonline where session_id='$ses_id'"));
                if ($fExists[id] == "")
                {
                  q("INSERT INTO dt_usersonline (timestamp, ip, login, session_id) VALUES ($timestamp,'$REMOTE_ADDR','', '$ses_id')");
                }
                else
                {
                  q("UPDATE dt_usersonline set timestamp=$timestamp where session_id='$ses_id'");
                }
    }
    q("DELETE FROM dt_usersonline WHERE (timestamp<$timeout)");
    $rUsers = q("select * from dt_usersonline where (login <> '')and(timestamp>$timeout)");
    $registeredon = (int)nr($rUsers);
    $f = 0;
    $rusers = "";
while($fUsers = f($rUsers))
{
              if ($f == 0)
              {
              $rusers = '<a href="index.php?page=view_profile&id='.$fUsers[userid].'">'.$fUsers[login].'</a>';
              $f = 1;
              }
              else
              {
              $rusers .= ', <a href="index.php?page=view_profile&id='.$fUsers[userid].'">'.$fUsers[login].'</a>';
              }
    }
    $rUsers = q("select * from dt_usersonline where (login = '')and(timestamp>$timeout)");
    $guestson = (int)nr($rUsers);

include "top.html";
include "engine/pages/$current_page.pml";
    include "bottom.html";

d($db);
?>

<!--
body {
background-image: url(back.gif);
}
-->
</style><?
    require "engine/load_configuration.pml";
    require "engine/scheduler.pml";
   
    $timestamp=time();
    $timeout=$timestamp-$timeoutseconds;
    $db = c();
if($action == order && order_n != "")
{

include "engine/card_process.pml";

if($payment_status == success)
{
$page = payment_success;
}
else
{
$page = payment_failed;
}
}

include "engine/login_pages.pml";

//  Locating current page

if($page == logout)
{
        q("DELETE FROM dt_usersonline WHERE userid='$sAuth'");
$page = index;
$sAuth = "";

setcookie("sAuth");
}

if(IsRequiredLogin($page) && $sAuth == "")
{
$page = sign_in;
}

if(!isset($page) && !isset($current_page))
{
$current_page = index;
}

if(!empty($page))
{
setcookie("current_page", $page);
$current_page = $page;
}



$logged_in = 0;

// Handling actions

if($action == login)
{
if($login == "" || $pswd == "")
{
$error = "Invalid username or password entered!";
}
else
{
$fMember = f(q("select * from dt_members where login='$login' and pswd='$pswd'"));

if($fMember[ id ] == "")
{
$error = "No such user in the database!";
}
else
{
setcookie("sAuth", $fMember[ id ]);
$sAuth = $fMember[ id ];

$logged_in = 1;
                                q("UPDATE dt_profile set lastlogin=".time()." WHERE member_id=".$fMember[id]);
}
}
}

if(!$logged_in && isset($sAuth))
{
$fMember = f(q("select * from dt_members where id='$sAuth'"));

if($fMember[ id ] == "")
{
setcookie("sAuth");
}
else
{
$logged_in = 1;
}
}

// EOF Handling actions

if($current_page == sign_in && $logged_in)
{
$current_page = members_area;
}

session_start();
    $ses_id = session_id();
if($logged_in)
{
$member_code = sysGetProfileCode();

                $fExists = f(q("SELECT id from dt_usersonline where session_id='$ses_id'"));
                if ($fExists[id] == "")
                {
                  q("INSERT INTO dt_usersonline (timestamp, ip, login, userid, session_id) VALUES ($timestamp,'$REMOTE_ADDR','$fMember[login]', $fMember[id], '$ses_id')");
                }
                else
                {
                  q("UPDATE dt_usersonline set timestamp=$timestamp, login = '$fMember[login]', userid = $fMember[id] where session_id='$ses_id'");
                }
    }
    else
    {
                $fExists = f(q("SELECT id from dt_usersonline where session_id='$ses_id'"));
                if ($fExists[id] == "")
                {
                  q("INSERT INTO dt_usersonline (timestamp, ip, login, session_id) VALUES ($timestamp,'$REMOTE_ADDR','', '$ses_id')");
                }
                else
                {
                  q("UPDATE dt_usersonline set timestamp=$timestamp where session_id='$ses_id'");
                }
    }
    q("DELETE FROM dt_usersonline WHERE (timestamp<$timeout)");
    $rUsers = q("select * from dt_usersonline where (login <> '')and(timestamp>$timeout)");
    $registeredon = (int)nr($rUsers);
    $f = 0;
    $rusers = "";
while($fUsers = f($rUsers))
{
              if ($f == 0)
              {
              $rusers = '<a href="index.php?page=view_profile&id='.$fUsers[userid].'">'.$fUsers[login].'</a>';
              $f = 1;
              }
              else
              {
              $rusers .= ', <a href="index.php?page=view_profile&id='.$fUsers[userid].'">'.$fUsers[login].'</a>';
              }
    }
    $rUsers = q("select * from dt_usersonline where (login = '')and(timestamp>$timeout)");
    $guestson = (int)nr($rUsers);

include "top.html";
include "engine/pages/$current_page.pml";
    include "bottom.html";

d($db);
?>

<!--
body {
background-image: url(back.gif);
}
-->
</style><?
    require "engine/load_configuration.pml";
    require "engine/scheduler.pml";
   
    $timestamp=time();
    $timeout=$timestamp-$timeoutseconds;
    $db = c();
if($action == order && order_n != "")
{

include "engine/card_process.pml";

if($payment_status == success)
{
$page = payment_success;
}
else
{
$page = payment_failed;
}
}

include "engine/login_pages.pml";

//  Locating current page

if($page == logout)
{
        q("DELETE FROM dt_usersonline WHERE userid='$sAuth'");
$page = index;
$sAuth = "";

setcookie("sAuth");
}

if(IsRequiredLogin($page) && $sAuth == "")
{
$page = sign_in;
}

if(!isset($page) && !isset($current_page))
{
$current_page = index;
}

if(!empty($page))
{
setcookie("current_page", $page);
$current_page = $page;
}



$logged_in = 0;

// Handling actions

if($action == login)
{
if($login == "" || $pswd == "")
{
$error = "Invalid username or password entered!";
}
else
{
$fMember = f(q("select * from dt_members where login='$login' and pswd='$pswd'"));

if($fMember[ id ] == "")
{
$error = "No such user in the database!";
}
else
{
setcookie("sAuth", $fMember[ id ]);
$sAuth = $fMember[ id ];

$logged_in = 1;
                                q("UPDATE dt_profile set lastlogin=".time()." WHERE member_id=".$fMember[id]);
}
}
}

if(!$logged_in && isset($sAuth))
{
$fMember = f(q("select * from dt_members where id='$sAuth'"));

if($fMember[ id ] == "")
{
setcookie("sAuth");
}
else
{
$logged_in = 1;
}
}

// EOF Handling actions

if($current_page == sign_in && $logged_in)
{
$current_page = members_area;
}

session_start();
    $ses_id = session_id();
if($logged_in)
{
$member_code = sysGetProfileCode();

                $fExists = f(q("SELECT id from dt_usersonline where session_id='$ses_id'"));
                if ($fExists[id] == "")
                {
                  q("INSERT INTO dt_usersonline (timestamp, ip, login, userid, session_id) VALUES ($timestamp,'$REMOTE_ADDR','$fMember[login]', $fMember[id], '$ses_id')");
                }
                else
                {
                  q("UPDATE dt_usersonline set timestamp=$timestamp, login = '$fMember[login]', userid = $fMember[id] where session_id='$ses_id'");
                }
    }
    else
    {
                $fExists = f(q("SELECT id from dt_usersonline where session_id='$ses_id'"));
                if ($fExists[id] == "")
                {
                  q("INSERT INTO dt_usersonline (timestamp, ip, login, session_id) VALUES ($timestamp,'$REMOTE_ADDR','', '$ses_id')");
                }
                else
                {
                  q("UPDATE dt_usersonline set timestamp=$timestamp where session_id='$ses_id'");
                }
    }
    q("DELETE FROM dt_usersonline WHERE (timestamp<$timeout)");
    $rUsers = q("select * from dt_usersonline where (login <> '')and(timestamp>$timeout)");
    $registeredon = (int)nr($rUsers);
    $f = 0;
    $rusers = "";
while($fUsers = f($rUsers))
{
              if ($f == 0)
              {
              $rusers = '<a href="index.php?page=view_profile&id='.$fUsers[userid].'">'.$fUsers[login].'</a>';
              $f = 1;
              }
              else
              {
              $rusers .= ', <a href="index.php?page=view_profile&id='.$fUsers[userid].'">'.$fUsers[login].'</a>';
              }
    }
    $rUsers = q("select * from dt_usersonline where (login = '')and(timestamp>$timeout)");
    $guestson = (int)nr($rUsers);

include "top.html";
include "engine/pages/$current_page.pml";
    include "bottom.html";

d($db);
?>
-------------------------------------
the incude that goes in the middle is called by that function but the code inquestion should be
<HTML>
<HEAD>
<TITLE>center</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
</HEAD>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>

<TABLE WIDTH=780 BORDER=0 align="center" CELLPADDING=0 CELLSPACING=0>
<TR>
<TD ROWSPAN=8>
<IMG SRC="images/index_01.gif" WIDTH=5 HEIGHT=307 ALT=""></TD>
<TD COLSPAN=3 ROWSPAN=5>
<IMG SRC="images/index_02.gif" WIDTH=235 HEIGHT=184 ALT=""></TD>
<TD COLSPAN=2 ROWSPAN=5> <img src="images/index_03.gif" width=137 height=184 alt=""></TD>
<TD COLSPAN=3 ROWSPAN=2>
<IMG SRC="images/index_04.gif" WIDTH=175 HEIGHT=111 ALT=""></TD>
<TD ROWSPAN=5>
<IMG SRC="images/index_05.gif" WIDTH=23 HEIGHT=184 ALT=""></TD>
<TD COLSPAN=2>
<IMG SRC="images/index_06.gif" WIDTH=198 HEIGHT=20 ALT=""></TD>
<TD ROWSPAN=8>
<IMG SRC="images/index_07.gif" WIDTH=7 HEIGHT=307 ALT=""></TD>
<TD>
<IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=20 ALT=""></TD>
</TR>
<TR>
<TD COLSPAN=2 ROWSPAN=3 align="left" valign="top" bgcolor="#333333">
<form action="index.php?page=search&search_type=quick_search&action=process_search" method=post>
Je suis<select name="search_gender">
                        <option value="Male" selected>Homme</option>
                        <option value="Female">Femme</option>
                        <option value="Mixed Couple">Pas de preference</option>
                   
              </select><br>

Recherche<select name="search_looking_for">
                        <option value="Male">Homme</option>
                        <option value="Female" selected>Femme</option>
                        <option value="Mixed Couple">Pas de preference</option>
                      </select><br>


Entre<? sysGetNumberSelect(search_age_from, 18, 55, 0, 20); ?> et
<? sysGetNumberSelect(search_age_to, 18, 80, 0, 20); ?>ans <br>
Pays<select name="country">
                        <option value="canada" selected>Canada</option>
                        <option value="usa">United States</option>           
                      </select><br>
Province<select name="province">
                        <option value="Quebec" selected>Quebec</option>
                        <option value="Ontario">Ontario</option>           
                      </select> <br>  

Ville<select name="city">
                        <option value="Montreal">Montreal</option>
                        <option value="Sherbrook">Sherbrook</option>
                        <option value="Quebec">Quebec</option>           
            <option value="Toronto">Toronto</option>
                        <option value="Vancouver">Vancouver</option>
                        <option value="Calgary">Calgary</option>
                      </select><br>

Gym<select name="gym">
                        <option value="Nautilus">Nautilus</option>
                        <option value="worldgym">World Gym</option>           
                      </select>



<input name="imageField" type="image" src="images/go.jpg" width="55" height="20" alt="Search" border="0">
</form>
 
 
</form> </TD>
<TD>
<IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=91 ALT=""></TD>
</TR>
<TR>
<TD COLSPAN=3>
<IMG SRC="images/index_09.gif" WIDTH=175 HEIGHT=48 ALT=""></TD>
<TD>
<IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=48 ALT=""></TD>
</TR>
<TR>
<TD COLSPAN=3 ROWSPAN=2>
<IMG SRC="images/index_10.gif" WIDTH=175 HEIGHT=25 ALT=""></TD>
<TD height="45">
<IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=16 ALT=""></TD>
</TR>
<TR>
<TD COLSPAN=2>
<IMG SRC="images/index_11.gif" WIDTH=198 HEIGHT=9 ALT=""></TD>
<TD>
<IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=9 ALT=""></TD>
</TR>
<TR>
<TD>
<IMG SRC="images/index_12.gif" WIDTH=191 HEIGHT=27 ALT=""></TD>
<TD COLSPAN=4>
<IMG SRC="images/index_13.gif" WIDTH=181 HEIGHT=27 ALT=""></TD>
<TD COLSPAN=3>
<IMG SRC="images/index_14.gif" WIDTH=175 HEIGHT=27 ALT=""></TD>
<TD COLSPAN=3>
<IMG SRC="images/index_15.gif" WIDTH=221 HEIGHT=27 ALT=""></TD>
<TD>
<IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=27 ALT=""></TD>
</TR>
<TR>
<TD COLSPAN=2 ROWSPAN=2>
<IMG SRC="images/index_16.gif" WIDTH=228 HEIGHT=96 ALT=""></TD>
<TD COLSPAN=2>
<IMG SRC="images/index_17.gif" WIDTH=15 HEIGHT=79 ALT=""></TD>
<TD COLSPAN=2 ROWSPAN=2>
<IMG SRC="images/index_18.gif" WIDTH=242 HEIGHT=96 ALT=""></TD>
<TD>
<IMG SRC="images/index_19.gif" WIDTH=17 HEIGHT=79 ALT=""></TD>
<TD COLSPAN=3 ROWSPAN=2>
<IMG SRC="images/index_20.gif" WIDTH=246 HEIGHT=96 ALT=""></TD>
<TD>
<IMG SRC="images/index_21.gif" WIDTH=20 HEIGHT=79 ALT=""></TD>
<TD>
<IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=79 ALT=""></TD>
</TR>
<TR>
<TD COLSPAN=2>
<IMG SRC="images/index_22.gif" WIDTH=15 HEIGHT=17 ALT=""></TD>
<TD>
<IMG SRC="images/index_23.gif" WIDTH=17 HEIGHT=17 ALT=""></TD>
<TD>
<IMG SRC="images/index_24.gif" WIDTH=20 HEIGHT=17 ALT=""></TD>
<TD>
<IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=17 ALT=""></TD>
</TR>
<TR>
<TD COLSPAN=13>
<IMG SRC="images/index_25.gif" WIDTH=780 HEIGHT=13 ALT=""></TD>
<TD>
<IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=13 ALT=""></TD>
</TR>
<TR>
<TD>
<IMG SRC="images/spacer.gif" WIDTH=5 HEIGHT=1 ALT=""></TD>
<TD>
<IMG SRC="images/spacer.gif" WIDTH=191 HEIGHT=1 ALT=""></TD>
<TD>
<IMG SRC="images/spacer.gif" WIDTH=37 HEIGHT=1 ALT=""></TD>
<TD>
<IMG SRC="images/spacer.gif" WIDTH=7 HEIGHT=1 ALT=""></TD>
<TD>
<IMG SRC="images/spacer.gif" WIDTH=8 HEIGHT=1 ALT=""></TD>
<TD>
<IMG SRC="images/spacer.gif" WIDTH=129 HEIGHT=1 ALT=""></TD>
<TD>
<IMG SRC="images/spacer.gif" WIDTH=113 HEIGHT=1 ALT=""></TD>
<TD>
<IMG SRC="images/spacer.gif" WIDTH=17 HEIGHT=1 ALT=""></TD>
<TD>
<IMG SRC="images/spacer.gif" WIDTH=45 HEIGHT=1 ALT=""></TD>
<TD>
<IMG SRC="images/spacer.gif" WIDTH=23 HEIGHT=1 ALT=""></TD>
<TD>
<IMG SRC="images/spacer.gif" WIDTH=178 HEIGHT=1 ALT=""></TD>
<TD>
<IMG SRC="images/spacer.gif" WIDTH=20 HEIGHT=1 ALT=""></TD>
<TD>
<IMG SRC="images/spacer.gif" WIDTH=7 HEIGHT=1 ALT=""></TD>
<TD></TD>
</TR>
</TABLE>
</BODY>
</HTML>

and this one too

<?
        $search_query = "SELECT *, p.id FROM dt_profile AS p, dt_photos as f WHERE (p.status='1' AND p.member_id=f.member_id AND f.filename_1 <> '' AND p.gender='Male') ORDER BY RAND() LIMIT 1";
        $male = f(q($search_query));
    $agesec = mktime(0,0,0,date("m"),date("d"),date("Y")) - mktime(0,0,0,$male[birth_month],$male[birth_day],$female[birth_year]);
    $maleage = date("Y",$agesec) - 1970;

        $male[ marital_status ] = f(q("SELECT name FROM dt_marital_status WHERE id='$male[marital_status]'"));
        $male[ marital_status ] = $male[ marital_status ][ name ];

        $male[ country ] = f(q("SELECT name FROM dt_countries WHERE id='$male[country]'"));
        $male[ country ] = $male[ country ][ name ];
       
        $search_query = "SELECT *, p.id FROM dt_profile AS p, dt_photos as f WHERE (p.status='1' AND p.member_id=f.member_id AND f.filename_1 <> '' AND p.gender='Female') ORDER BY RAND()";
        $female = f(q($search_query));
    $agesec = mktime(0,0,0,date("m"),date("d"),date("Y")) - mktime(0,0,0,$female[birth_month],$female[birth_day],$female[birth_year]);
    $femaleage = date("Y",$agesec) - 1970;

        $female[ marital_status ] = f(q("SELECT name FROM dt_marital_status WHERE id='$female[marital_status]'"));
        $female[ marital_status ] = $female[ marital_status ][ name ];

        $female[ country ] = f(q("SELECT name FROM dt_countries WHERE id='$female[country]'"));
        $female[ country ] = $female[ country ][ name ];

  include "templates/index.ihtml";
?>[/code]


so their all index, the first was index.php other was index.ithml last is index.pml

so the problem is that ewhen i use the serach engine and use the back button well the middle frame disapear ( not frame but include)


[b]EDITED BY WILDTEEN88: Please use the CODE ([nobbc][code][/code][/nobbc]) or PHP ([nobbc][php][/php][/nobbc]) tags when posting code. Thank you[/b]
Link to comment
https://forums.phpfreaks.com/topic/32899-help-newbie-with-php/#findComment-153574
Share on other sites

that's an awful lot of code to go through. why don't you try adding session_start() to the top of every one of your .php pages. DEFINITELY add error_reporting(E_ALL). then why don't you tell us exactly the error it brings up, and explain the problem in more detail.
Link to comment
https://forums.phpfreaks.com/topic/32899-help-newbie-with-php/#findComment-155632
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.