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

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??

$row["referalvisits"]=0;

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 .

Thanks

post your full code ....

$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

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.