User Profile

Collapse

Profile Sidebar

Collapse
gregerly
gregerly
Last Activity: May 12 '11, 05:55 AM
Joined: Sep 2 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • What's the best way to maintain sessions on two domains?

    Hello All,

    I'm working on a project right now that will require me to maintain a session on two separate secure domains. So user logs into domain a, and can quickly switch to domain b without having to re-authenticate. What would be the best way to approach this. Has anyone done anything like this?
    See more | Go to post

  • gregerly
    started a topic working with forms

    working with forms

    Hello All,

    I'm a PHP programmer pretending to be a python programmer right now. I'm playing around with the interactive prompt via putty on my server and am getting the hang of the syntax and naming conventions. One thing I can't / haven't wrapped my head around is how this works with websites. For instance, with PHP, I can post form data directly to my script and PHP can work with it. As far as I can tell, I'm not going to be...
    See more | Go to post

  • gregerly
    replied to cannot store this date in mysql table
    in PHP
    Try

    $dob = $year. '-' . $month . '-' . $day;

    Greg
    See more | Go to post

    Leave a comment:


  • gregerly
    replied to remapping dynamic subdomain
    Hey no problem Markus, I appreciate your input. Ok, so it's fairly simple it looks like, I think the hardest part is figuring out how to phrase the google query to find what I'm looking for. I should have guessed it would be ! (not) this domain.

    I'll see what I can work out with this. Thanks again!

    Greg
    See more | Go to post

    Leave a comment:


  • gregerly
    replied to remapping dynamic subdomain
    Hey Markus,

    I have a vps, so I can do what ever. I'm just not sure exactly how to set it up. I added a wildcard domain, so all subdomains resolve, I just need the .htaccess to pick up the slack.

    I actually had something working OK, but it redirected all subdomains. There are some I do not want redirected, like the main application, the demo version, the dev version, etc...all which are on their own subdomain. ...
    See more | Go to post

    Leave a comment:


  • gregerly
    started a topic remapping dynamic subdomain

    remapping dynamic subdomain

    Hi, I'm working on a web app and want to be able to offer my users a URL such as:

    username.mydoma in.com

    but have it map to:

    mydomain.com/controller/method/username

    FYI, I'm using codeigniter PHP framework, which should explain the above URL I need to map to.

    I'm thinking this should be done with mod_rewrite, and I've tried various method to no avail. Any ideas on how to go about this?...
    See more | Go to post

  • gregerly
    replied to Redirecting first time users to login page
    in PHP
    What Dan Said

    Dan's on the right track here. What you need to do is create a "hook" that will hook into certain processes before the page is rendered that can check that the user is logged in. This way you don't have to go back and alter all 1000 files you created. Your login check is done in one location, and run before the user is redirected to the requested page.

    In Dan's example the index.php would...
    See more | Go to post

    Leave a comment:


  • gregerly
    replied to problem with select query
    SOLVED: because I gave up. I don't think what I want to do can be done with MySQL (not because of mysql, but because of my DB set up). I've decided to just do the date comparisons with PHP rather than mysql. It's less efficient, but I don't see a way to do it with straight mysql.

    Thanks for your help guys!

    Greg
    See more | Go to post

    Leave a comment:


  • gregerly
    replied to problem with select query
    Ok, I'm back and this is getting a little old. The suggestion that Code Green gave was spot on, but I realized it was still not quite what I need. The code shouldn't be a problem, rather it seems the logic I'm having a problem with.

    I need to create a report that lets the user know which of their clients have been in for an appointment in X amount of INTERVAL. The query I have now basically says, "Select all clients where the...
    See more | Go to post

    Leave a comment:


  • gregerly
    replied to problem with select query
    Your the man Code Green, this is just what I was looking for. I was making it more complicated than it had to be. Thanks for your answer!

    Greg
    See more | Go to post

    Leave a comment:


  • I can't comment on the rainforesnet.co m script, as I haven't used it. I will say again that I am currently using and having no problems cross browser with jQuery UI datepicker. At least there are live demos where you can test in each browser and see if it works. Give it a shot.

    http://jqueryui.com/demos/datepicker/...
    See more | Go to post

    Leave a comment:


  • The $_SERVER variable is a bad way of doing any kind of authentication. I would suggest you really look into how you authenticate your users and overhaul your existing system. The $_SERVER variable can be manipulated on the client site believe it or not, which makes it an unsuitable choice for authentication.

    Maybe I'm not understanding how you arrived at your current system. You need to know that SSL (https) is simply a way of...
    See more | Go to post

    Leave a comment:


  • Look at jquery ui datepicker. One of the best cross browser datepicker / calendar I've used. I use it extensively in my most current project.

    Hope that helps!

    Greg
    See more | Go to post

    Leave a comment:


  • I think this is going to depend on how exactly your tracking that your user is "logged in". SSL shouldn't have anything to do with your users logged in status. Typically, a user would log in and a flag of some sort would be set that says the user is logged in. Cookies and sessions come to mind. When the user logs out, simply kill the cookie and or session. Validate the credentials each time the page loads. You should be able to avoid...
    See more | Go to post

    Leave a comment:


  • gregerly
    replied to how should I write this query
    in PHP
    Right, I see the theory here. I will need to see how I can work that in. Thanks for the idea!
    See more | Go to post

    Leave a comment:


  • gregerly
    replied to problem with php inside javascript
    in PHP
    ok, you've got a whole slew of problems here. First, the reason your always getting the error alert is due to scope problems. In state_Change() you are refferencing a variable that does not exist to the function. You need to pass it in or make it somehow available to the function. Right now it's being created and is only accessible by the function one(). This is probably the basis of your problem. Is any data being deleted? If so, your ajax...
    See more | Go to post

    Leave a comment:


  • gregerly
    replied to convert string to date
    You will probably be better off using the proper format instead of hacking it to get it working a way it's not supposed to. I would use whatever language your using to interact with the database to alter the format and insert the data as yyyy-mm-dd. I use php, so I'll show you a little example:

    Code:
    //date your working with
    $date = '09/22/1979';
    
    //create an array of the date pieces
    $temp = explode('/',$date);
    ...
    See more | Go to post

    Leave a comment:


  • gregerly
    started a topic how should I write this query
    in PHP

    how should I write this query

    I have posted this over at the MySQL forum with no responses, so I thought I might pick the brains of the PHP gurus... I'm having an issue with an SQL query. Heres what I have:

    2 tables, client_tbl and appt_table, they join using client_id

    I'm trying to write a report that will show me:

    a) Any clients that have not had an appointment in X amount of time.
    This would be done using DATE_SUB(CURDAT E(),...
    See more | Go to post

  • gregerly
    started a topic problem with select query

    problem with select query

    Hello, I'm not sure how to properly format a query that I need to select some database information. I have two tables, one named "appts" and another "clients". They are linked by client_id. I'm trying to write a query that will show me clients that haven't had an appointment is "X" amount of "time units". I'm doing this like:

    SELECT * FROM appts JOIN clients ON appts.client_id = clients.client_ id...
    See more | Go to post

  • gregerly
    started a topic Comparing month and year from a timestamp

    Comparing month and year from a timestamp

    Hello, I've got a question regarding the comparison of a date and year to a timestamp. I've got blog entries that get a timestamp on their way into my database (mysql). I'm programming an "archives" section, and I can't seem to select the info using month and year. Basically what I want to do is say:

    select all artices where the month of the timestamp = $given_month AND year of the timestamp = $given_year.

    ...
    See more | Go to post
    Last edited by gregerly; Jan 7 '09, 08:25 PM. Reason: Fixed the problem.
No activity results to display
Show More
Working...