Jump to content

clairian

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

clairian's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, I am quite new to php and need to secure my site as it will hold personal info. For example, when a user selects: <a href="EditTenantFormT.php?UID=<?php echo ($row['UID']) ?>">Edit My Details</a> It passes them to a page to edit their data. However, as the 'user id' is passed through the URL this is not secure as the db can be queried through the URL: http://localhost/OceanBlue/EditTenantFormT.php?UID=20 What would be the best (and easiest) method of stopping the UID being shown in the URL. I did try urlencode/urldecode but it didnt seem to work - is this the best method?
  2. Hi, thanks for the input, however that is still not working. I have changed the syntax of the hyperlink: <a href="EditTenantFormT.php?UID=<?php echo urlencode($row['UID']); ?>">Edit My Details</a And the descode on the edit tenant form is: $UID = urldecode($_GET['UID']); This does pass the UID value through, but the UID value is still seen on the URL that is passed between the two: http://localhost/OceanBlue/EditTenantFormT.php?UID=20 Is there anything else that I am missing?
  3. Hi, i'm pretty new to php and am having trouble trying to secure my data passed over URL's with the urlencode/urldecode functions. I'm using the following to encode the UID: <a href="EditTenantFormT.php?UID=', urlencode(<?php echo $row['UID'] ?>), '">Edit My Details</a><br /> I then want to decode the UID in EditTenantFormT but don't know how I would go about doing this. Any help would really be appreciated. Thanks Claire
  4. Hi, I'm new to php/html and am having some trouble with my checkboxes. I want to use the on/off value of checkboxes to filter some data. The user selects the ones that they want on and then filter, which refreshes the page and passes the on/off values. However, the checkbox always goes back to being unchecked regardless of it the value selected is on or off. Any ideas how i can get the checkboxes to read whether they should be on or off. Any help would be greatly appreciated. $property = $_GET['property']; $supermarket = $_GET['supermarket']; <form method="get" action="PropMain.php" name="Amenity"> <img src="MapsIcons/house.png" /> <input type="checkbox" name="property"/> <img src="MapsIcons/basket.png" /><input type="checkbox" name="supermarket"/> <P><input name="Refresh" type="submit" value="Filter"> </form>
  5. Hi, I am trying to use checkboxes so that when you select or deselect the checkbox it automatically sends the value (on/off) of that checkbox with a page refresh. However, at the moment (using the code below) when i check the box it refreshes the page with the value of property as 'on', but leaves the checkbox unchecked, so i can never deselect the checkbox to make the value of property 'off'. Any help would be greatly appreciated. $property = $_GET['property']; <form method="get" action="PropMain.php" name="Name"> <img src="MapsIcons/house.png" /> <input type="checkbox" name="property" onclick="checkHouse()"/> </form> function checkHouse() { if (Name.property.value != "") { Name.submit(); } }
  6. Hi, I am storing dates in my database in the usual date format (yyyy,dd,mm) Is there any way to use php to display this db data in a more readable 'longdate' format - e.g. 18 March 2008? Any help would be greatly appreciated.
×
×
  • 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.