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?

Link to comment
Share on other sites

??????

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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