Jump to content

newbtophp

Members
  • Posts

    631
  • Joined

  • Last visited

Everything posted by newbtophp

  1. I guess cookies being readable on the www. version is really a no issue, the main concern lies with cookies being readable on subdomains - which I don't want (due to security).
  2. Appreciate you clarifying, however if $site was set to domain.com, would cookies be readable on any other variation such as www.domain.com or somethingelse.domain.com or www.somethingelse.domain.com (which is what I don't want)?
  3. I have as mentioned in my initial post, my follow up question was to clarify your response, are you referring to the fourth parem of setcookie()?
  4. Hmm...If I understand you correctly - do you mean changing $site to '/' ? - did not know you could do that.
  5. I have a script where $site (location of where it's hosted) will either be in the format of a subdomain e.g. 'something.domain.com' or a domain 'domain.com', and the cookies are handled like the following: ini_set('session.cookie_domain', $site); //for sessions setcookie($name, $value, $expiry, '/', $site, false, true); //for others My question is the script's canonical url is non-www and I don't want other subdomains for various reasons (including security) being able to access/read the cookies (e.g. 'www.something.domain.com' or 'www.domain.com' or 'somethingelse.domain.com' or 'www.somethingelse.domain.com'), so would you say the above will work okay (providing $site does not proceed with www. or .)? I have searched around (also referred to php.net) and believe the above will be okay from my understanding - but wanted reassurance as I had read many conflicting/confusing information! Edit: If the above won't work - I thought about maybe setting $site to false (the .htaccess code would enforce access only via non-www)?
  6. What I'd really like to learn, is how to manage (edit/delete/submit) data via php (form) to a database (table). This would be a greate tutorial, and would really help me, I believe it would also benefit others who are looking to manage sql info via php. So for example the tutorial would consist of: A form which can submit names to a database (Submit) A form to delete names from the database. (Delete) And a form which can edit the names in the database (Edit). names = data This just an example, i know their might better be ways. I've googled tutorials on this and their just for a specific function, ie. Delete. Theirs none that i know which teach how to do all in one. Thanks
×
×
  • 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.