Jump to content

jdowen2211

Members
  • Posts

    14
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://theepiccoder.com

Profile Information

  • Gender
    Male

jdowen2211's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks for that, just what I wanted!
  2. How do I align profileright to the top of the page so it is in line with profileleft? <html> <head> <style type="text/css"> #profilelayer { width:900px; vertical-align:top; margin:0px auto; text-align:left; padding:1px; border:1px solid #333; } #profileleft { width:218px; text-align:left; border:1px solid #333; } #profileright { width:670px; float:right; text-align:left; border:1px solid #333; } </style> </head> <body> <?php include_once "header_template.php"; ?> <div id="profilelayer"> <div id="profileleft"> <?php echo $user_pic; ?> </div> <div id="profileright"> <span style="font-size:16px; font-weight:800;"><?php echo $mainNameLine; ?></span> </div> </div> </body> </html>
  3. I want to add an email option to a HTML that parses with PHP and submits data to a MySQL database but I'm not too sure are submitting email. I have the email field already created in the structure of the database but when the form is submitted, I want to make sure the email is valid. I use this for other $row's: $firstname = preg_replace('#[^A-Za-z]#i', '', $_POST['firstname']); // filter everything but desired characters So what preg_replace would I use for email?
  4. I just went to the profile, which in my case is profile.php, and added the following code where I want it to display on the page: <?php if ($person_type == "") { $person_type = ""; } switch ($person_type) { case "s": echo "$username is a Student"; break; case "t": echo "$username is a Teacher"; break; case "p": echo "$username is a Parent"; break; } ?>
  5. Well this is the code I'm using and I'm trying to echo it out with <?php echo $person_type; ?> but instead at the top of the profile where errors display it just says 'student' which is a start and when I want it to display in the profile is says 's' still. Once I get it to where I want I'm going to add ' . $username . " is a student/teacher/parent. For now I'm going to put the code below onto the profile where I want it to display. if ($person_type == "") { $person_type = ""; } switch ($person_type) { case "s": echo "student"; break; case "t": echo "teacher"; break; case "p": echo "parents"; break; }
  6. It's not working, it's just throwing errors at me. Do I need to put it in the part of the profile where I want it to display or do I put it with the other PHP code at the top of the file that renders the page then echo it out with <?php echo $person_type; ?>
  7. I tried this before and it just said James is a s but I want the s to be Student: if ($person_type == "") { $person_type = ""; } else { $person_type = '<br /><br /><strong>' . $username . ' is a ' . $person_type . ''; }
  8. I have a social network with user profiles and when a user signs up, they enter whether they are a student, parent or teacher. That is then sent to a MySQL database and is collected successfully. I want that data to display on their profile but in the database it is stored like this: s for student, t for teacher and p for parent. I managed to get it on the profile saying something like this, "username is a s". I want that s to say student and if they are a teacher then I want teacher and so on. Could someone give me some code that will help because everything I have tried so far has failed. Help will be much appreciated.
  9. Yeah I had all that in mind anyway but thanks for the help.
  10. Well the social network gives people their own profile and they can message people but I'm learning as I go along.
  11. I am building a social network with PHP and MySQL and I want my members to be able to upload most kinds of files to the server then be able to download them at a later date. I want the files to be only visible to that user when they are logged in. I haven't a clue of how to do this and need help from you guys. Maybe a script or some tips, I will be grateful for anything.
×
×
  • 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.