Web Design Forum: DaveyL - Viewing Profile - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting

DaveyL's Profile User Rating: -----

Reputation: 1 Neutral
Group:
Members
Active Posts:
60 (0.04 per day)
Joined:
26-September 08
Profile Views:
1,981
Last Active:
User is offline Apr 26 2012 08:05 AM
Currently:
Offline

My Information

Member Title:
Forum Newcomer
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Male Male

Contact Information

E-mail:
Private

Users Experience

Experience:
Intermediate
Area of Expertise:
Web Designer

Latest Visitors

Topics I've Started

  1. Cookies

    12 April 2012 - 01:00 PM

    Hi Folks
    Sorry if this is in the wrong place, however I have a question about the use of Cookies and compliance.

    I build most of my sites using WP, so apart from the general cookies, for example (including a wordpress_test_cookie):
    • PHPSESSID
    • wordpress_logged_in_44f4de7aa23168fa38f17d2e9ac7c0e6


    I also have one for a plugin:
    • wpfilebase


    These all expire at the end of the session, so my question is - 'What action do I have to take' I am aware a page about cookies may not suffice, I am not logging any personal data (the logged in one above is only after members sign in obviously) other than that I think these are simply tracking cookies on visitor useage.
  2. Code for users to delete entry from MySQL db

    10 February 2012 - 09:45 AM

    Hi

    I have PHP/MySQL registered area which works fine, users complete a form to register and supply their own U/N and PW and profile details etc - get confirmation email to activate account and once verified they can log in to a members area and edit their user profiles. The db then stores info adding incremental id's etc

    However I have just had that DOH moment and realised I haven't provided an option for them to delete their profile from the db!

    Where would I start, is there a basic php script I can modify that allows them to remove their entire entry from the db? - I would only provide a link to a 'delete.php' page within the members area, so bear in mind they will have already been verified for access so will just add my own checksession.php script when they view the page?

    My idea on the delete.php page would be, even though they are 'signed in' to access it - I would want one box to ask 'Are you sure you want to delete your profile?' they tick YES or NO and if YES ask them to re-enter their password to confirm and it redirects to a sorry to see you go page (goodbye.php)

    Hope that makes sense!

    Cheers
    Davey
  3. Foreign keys

    30 November 2011 - 11:26 AM

    Hi

    I am (self) learning PHP / MYSQL and have a question about the use of Foreign keys and constraints.

    So correct me if I am on wrong track here please, a foreign key field in a table allows me to match a candidate key of another table so I can cross reference them.

    Therefor my question relates to why/when I would use a CONSTRAINT when creating the table? Hope this makes sense
  4. Wordpress post expire plugin?

    30 November 2011 - 09:13 AM

    Hi Folks
    Just wondered if there is a way (or a plugin) that will allow me to set an expiry date on a WP Post?

    I don't want to trash items as they need to remain for audit purposes visible on the website.

    On the home page I list the latest 5 new posts using the sidebar widget, all published posts are listed on a assigned page called 'News'

    A problem may occur tho where the home page is displaying a post with an event that has past, obviously doesn't look good so I want the site owner to be able to simply assign an expire date rather than go in and manually trash it.

    It would then need to ensure it doesn't show on the home page but still lists on the News page?
  5. PHP registration help

    23 August 2011 - 10:42 AM

    Hi Folks
    My first attemp with PHp project and almost all seems fine, you can register and login fine, I even have a 'profile' button allowing the user to update their profile details etc. However on the p[rofile when it retrieves their details the 'age' and 'league' are blank despite being submitted on the form.
    This is the reg form code

    Quote

    if (isSet($_REQUEST["p_username"]))
    { /* Sanitise input from user */
    $forename = sanitise($_REQUEST["p_forename"]);
    $surname = sanitise($_REQUEST["p_surname"]);
    $username = sanitise($_REQUEST["p_username"]);
    $password = sanitise($_REQUEST["p_password"]);
    $email = sanitise($_REQUEST["p_email"]);
    $role = sanitise($_REQUEST["p_role"]);
    $qual = sanitise($_REQUEST["p_qual"]);
    $contact = sanitise($_REQUEST["p_contact"]);
    $countyFA = sanitise($_REQUEST["p_countyFA"]);
    $division = sanitise($_REQUEST["p_division"]);
    $team = sanitise($_REQUEST["p_team"]);
    $age = sanitise($_REQUEST["p_age"]);
    $league = sanitise($_REQUEST["p_league"]);
    $address = sanitise($_REQUEST["p_address"]);
    // Check values - set usrMessage if there's any problems
    if (empty($forename)) { $usrMessage = $usrMessage . "Please enter a forename.<br/>"; }
    if (empty($surname)) { $usrMessage = $usrMessage . "Please enter a surname.<br/>"; }
    if (empty($password)) { $usrMessage = $usrMessage . "Please enter a password.<br/>"; }
    if (empty($email)) { $usrMessage = $usrMessage . "Please enter an email address.<br/>"; }
    if (empty($username)) { $usrMessage = $usrMessage . "Please enter a username.<br/>"; }
    if (empty($role)) { $usrMessage = $usrMessage . "Please choose a role.<br/>"; }
    if (empty($qual)) { $usrMessage = $usrMessage . "Please choose a qualification level.<br/>"; }
    if (empty($contact)) { $usrMessage = $usrMessage . "Please enter some contact details.<br/>"; }
    if (empty($countyFA)) { $usrMessage = $usrMessage . "Please choose a County FA<br/>"; }
    if (empty($division)) { $usrMessage = $usrMessage . "Please choose a division.<br/>"; }
    if (empty($team)) { $usrMessage = $usrMessage . "Please enter a team name.<br/>"; }
    if (empty($age)) { $usrMessage = $usrMessage . "Please choose an age group.<br/>"; }
    if (empty($league)) { $usrMessage = $usrMessage . "Please choose a league.<br/>"; }
    if (empty($address)) { $usrMessage = $usrMessage . "Please choose a qualification level.<br/>"; }

    if (!isset($usrMessage))
    { // Check that the username is not already taken
    $sqlText = "SELECT U_UserName FROM t_users WHERE UPPER(U_UserName) = UPPER('$username')";
    $result = mysql_query($sqlText);
    if (mysql_num_rows($result) > 0)
    { $usrMessage = 'Sorry, this username has already been taken.<br/>'; }
    mysql_free_result($result);
    }

    // If all the required fields have been entered, insert them into the database
    if (!isset($usrMessage))
    { $sqlText = "INSERT INTO t_users(U_Forename, U_Surname, U_UserName, U_EMail, U_Password, U_AccessLevel, U_Status,
    U_CountyFA, U_Division, U_AgeGroup, U_League, U_Role, U_QualLevel, U_TelNo, U_Address, U_Team)
    VALUES('$forename', '$surname', '$username', '$email', '$password', 'User', 'Unverified',
    '$countyFA', '$division', '$age', '$league', '$role', '$qual', '$contact', '$address', '$team') ";
    $result = mysql_query($sqlText);
    mysql_close();

    What am i missing - I know it will something so simple but I now can't the ph for the p!