Tracking Users - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Tracking Users

ruckerrucker Posts: 2Member
I want to have an info form on my site that will allow users to click a couple of radio buttons (no big deal). The problem is that I want it to go to a database. The other problem is that I don't understand how to make this form appear only once for each user (basically I don't know how to use cookies). I would also like the form once submitted to take the user to the home page. Can anyone provide code that will do this? Or put me on the right track to finding it? If you can't tell, I am not inherently a programmer. I understand code when I look at it, but the logic escapes me for some reason. Please I need a hand out or I am getting fired for sure.

Comments

  • JonathanJonathan Posts: 2,914Member
    : I want to have an info form on my site that will allow users to
    : click a couple of radio buttons (no big deal). The problem is that
    : I want it to go to a database. The other problem is that I don't
    : understand how to make this form appear only once for each user
    : (basically I don't know how to use cookies). I would also like the
    : form once submitted to take the user to the home page.
    OK, you need a server side script that displays the form depending on whether the cookie has been set, and another server side script that will take the submitted data, connect to a database, do a query to store it, and then print a location header that sends the user to the homepage. It's not all that hard and some basic tutorials on CGI programming will tell you how to do all apart from the database bit. And there is a very good article on the database bit in the CodePedia.

    : Can anyone provide code that will do this?
    I *can*, but I'd rather not. I'm happy to help if you try it yourself and get stuck with the code at some point.

    : Or put me on the right track to finding it?
    Look for CGI Programming tutorials, have a crack at the cookie bit first and the sending the user to the homepage. Save the database bit till later as it's likely to be the most difficult.

    : If you can't tell, I am not inherently a programmer. I understand
    : code when I look at it, but the logic escapes me for some reason.
    Writing code for this kind of stuff isn't rocket science; the biggest risk you face is that of writing insecure code. Your best bet is to break the problem down into little bits that you can code, until you have the whole thing.

    : Please I need a hand out or I am getting fired for sure.
    In which case, me giving you code would only keep you out of problems until the next time you needed some code...

    So, find some online tutorials, read them, practice with cookies and some basic CGI stuff, then start making it do what you want. Let me (and anyone else who's watching this) know how you get on.

    Jonathan


    ###
    for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");

  • ruckerrucker Posts: 2Member
    Jonathan, thanks for the info and I can appreciate your view of me doing it myself. The only problem is that I can't. I was asked (basically forced) to do this website by my boss and I have never even written a line of code. i just used Front Page to put the site together. I would like to learn this, but I just don't have time. You see I am junior management, hence I get all the jobs that nobody wants to do. This was one of them, and I would be very appreciative if you could just send your code my way. Between this and all the other projects I have going, I've been working 14 hour days. I just want it to be over with. My boss told me that if I do all this initial stuff she will hire someone who actually has a technical background when we get more involved. Pleas help, I am desperate.

    Chad
  • reckeyreckey Posts: 1Member
    Hello,
    In addition to acting as a sounding board for management, we provide comprehensive, flexible strategies that address the issues affecting your business.
    Thanks.
    -------------
    url=http://www.jonescga.com/]tax accountant saint john[/url]6

Sign In or Register to comment.