Jump to content

I finaly got it up (my site) need help with a hit counter


nouse4one

Recommended Posts

Thank god 12 days straight working on this thing! Now i need a hit counter to count every time some one submits a email to one of my users.  Each user on my site has a profile with there personal info stored in my db, which is called by a user_id. On each of there profile's they have a survey. After some one fills out there survey and clicks submit i want it to add a +1 to there db info so they can keep track of how many peeps fill out there dating application.  check out a live example here screencupid.com/60

do i use fwrite functions with a text file? Can i store the numbers in my db?

??????

<?php

  require_once('appvars.php');

  require_once('connectvars.php');

 

$dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);

$query = "SELECT  sub_count FROM my_user WHERE user_id = '" . $_POST['user_id'];. "'";

 

$sub_count = ('user_id', $row['user_id'], $row['sub_count'] + (1)); 

 

  mysqli_close($dbc);

?>

how do i use the update function?

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.