Hello all I need fast answer on this: How i can change(or) reset value ["referalvisits"] to ZERO?
let's say that there is some value: for example 23220
I need reset it to zero and count again from zero..

<th>Referral Visits</th>
<td>&nbsp;&nbsp;<? echo $row["referalvisits"]; ?></td>


thank you alot
I will send 5$ on alertpay if you will resolve my problem..

8 Years
Discussion Span
Last Post by Aamit

are you retrieving value from database ??
i think you are using while loop..
and fetching result in $row ....

so give me more info about this??



add this to where you want to make that variable 0.

That is all you should do.

That means $row["referalvisits"] is an ordinary array variable which you set its values from db.

Also php is free enjoy it. You dont need to pay someone to ask a question about php .


$sql="Update yob_users SET referalvisits='0' where  username='$user' ";

$result = mysql_query($sql);
$row = mysql_fetch_array($result);

by using this you set value for referalvisits 0

then check referalvisits or declare variable count
check visits & increment count++
then set referalvisit with that count and dispaly referalvisits using echo

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.