Jump to content

GD77

Members
  • Posts

    108
  • Joined

  • Last visited

Everything posted by GD77

  1. oh man I m stupid :/
  2. $fetch_1>0 && $fetch_1<4 <-- means values betwen 0 and 4 1,2,3... f the value is 5 or 6 the code should not be executed so why is it?
  3. Hello, I ve the following code and the if is always returning returning true: function db_LA() { $this->u_tst="....."; $qry_1=mysql_query("SELECT COUNT(`yyy`) FROM `tbl` WHERE `id_tst`='".$this->u_tst."' "); $fetch_1=mysql_result($qry_1,0,0); if($fetch_1==0) { $qry_2=mysql_query("INSERT INTO `tbl` (...) VALUES (...) or die(mysql_error()); } if($fetch_1>0 && $fetch_1<4) { $qry_2_Update=mysql_query("UPDATE `tbl` SET `att` = `att` +1 WHERE `id`='".$this->u_tst."'); } } //if($fetch_1>0 && $fetch_1<4) { <---- this is being exsecuted even if the value was above 4
  4. echo solved the delay and the $msg problem with this: $msg="Welcome, You Are Logged In. <script type='text/javascript'> function delayed(){parent.boxOFF();parent.location.reload(true);} window.setTimeout(delayed,2000);</script>"; Don t know if their is a another or better way... Thanks again.
  5. Actually that is what I ve done: $msg="Welcome, You Are Logged In."; sleep(2); echo "<script type='text/javascript'>parent.boxOFF();</script>"; and it s working but now the echo command is preventing the $msg data from showing
  6. Hello: How to pass a js command like parent.function(); with php without onClick just php... need this to be apllied before header(); or with it Thanks.
  7. Used this: public function pg_Index(){ $mData="3info"; return $mData; } worked.
  8. $yyy; $metaDesc; $tst1="fkr"; class pg { public function yeh() { global $tst1; echo $tst1; } public function pg_Index(){ echo "tst3"; } public function pg_Company(){ echo "tst4"; } } //$mD_0=pg::pg_Index(); //$mD_1=pg::pg_Company(); $mD_5=pg::pg_Register(); if($yyy=='xxx'){$metaDesc=pg::yeh();} if($yyyy=='xxx'){$metaDesc=$mD_1;} if($yyy=='xxx'){$metaDesc="Registration Page";} print_r ("<meta name='description' content='".$metaDesc."' />"); //////////////////////////////////////////////// why the object of the class being echoed to the page by default? o.O why can't get the data from the object into the final $metaDesc?
×
×
  • 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.