-
Posts
88 -
Joined
-
Last visited
Never
Everything posted by sean04
-
Thanks Zanus and jesirose for the reply. I think I'll try Heredocs. As for why I would bold an image, I wouldn't I posted a bad example lol. Thanks again, Sean
-
This might be a stupid question but what is a better practice? echo" <b> <img src''> </b>"; echo"<b>"; echo"<img src''>"; echo"</b>";
-
Thanks gwolgamott. Im just getting all my information from a view as I posted some of my code in my previous post. Do you have any ideas of how I can do this with the way im doing things now? Thanks, Sean
-
Hey, So on my profile page I have a lot of info such as Name, Birthday, City, Country, Status etc... Its set up like this... Name: $loggedInfo[Name]<p/> Birthday: $loggedInfo[birthday]<p/> City: $loggedInfo[City]<p/> Country: $loggedInfo[Country]<p/> Status: $loggedInfo[status]<p/> The problem is is that if the user doesnt fill out this info then there is a blank space on their profile. How can I go about having it so if there is no data for say Country, on their profile there will be a link and it will say "Edit this!" and that link can just go to edit profile. Pretty much I dont want to do this for everything... if($loggedInfo[Name] != "") { echo"$loggedInfo[Name]"; }else{ echo"<a href='edit_profile.php'>edit this!</a>"; } Thanks, Sean
-
Hey, So I have a quick question. What is the best way to set up a User Level page type of thing. For example... if($loggedin[user_Level] == 1){ echo"account banned"; } if($loggedin[user_Level] == 2){ echo"account removed"; } if($loggedin[user_Level] == 3){ echo"user profile"; *THIS WILL SHOW THE USERS PROFILE* } Would that be the way to do it? Thanks, Sean
-
Hey guys, I have 3 radio buttons and a textbox. I can search users by user id, screenname, or email. For some reason when I type in say 7 for a user id, nothin comes up?! like my user id is 7. any ideas? Another thing... when I search by screenname or email any of MY information doesnt come up and im not sure why. everyone else's does but mine. any help would be great! Or if anyone has a better idea that would be great too! thanks! echo" <form action='?SearchUser' method='post'> Search user by:<p/> <input type = 'Radio' Name ='SearchBy' value='UserID'>User ID<br/> <input type = 'Radio' Name ='SearchBy' value='ScreenName'>Screen Name<br/> <input type = 'Radio' Name ='SearchBy' value='Email'>Email<br/> <p/> <input id='info' type='text' name='info' /><p/> <input type='submit' name='submit' value='Search'/> </form>"; //make picture the profile picture if(isset($_GET['SearchUser'])) { $searchBy = $_POST['SearchBy']; $userInfo = htmlspecialchars(mysql_real_escape_string($_POST['info'])); if($searchBy == "UserID"){ $searchUser = mysql_query("SELECT * FROM viewInformation WHERE UserID LIKE '".$userInfo."%'")or die(mysql_error()); $seachUserCount = mysql_fetch_array($searchUser); if(mysql_num_rows($searchUser) == 0){ echo"No Users Found"; } else { while ($UserSearch = mysql_fetch_array($searchUser)) { echo "$UserSearch[screen_Name]<br/>"; } } } else if($searchBy == "ScreenName"){ $searchUser = mysql_query("SELECT * FROM viewInformation WHERE ScreenName LIKE '".$userInfo."%'")or die(mysql_error()); $seachUserCount = mysql_fetch_array($searchUser); if(mysql_num_rows($searchUser) == 0){ echo"No Users Found"; } else { while ($UserSearch = mysql_fetch_array($searchUser)) { echo "$UserSearch[screen_Name]<br/>"; } } } else if($searchBy == "Email"){ $searchUser = mysql_query("SELECT * FROM viewInformation WHERE EmailAddress LIKE '".$userInfo."%'")or die(mysql_error()); $seachUserCount = mysql_fetch_array($searchUser); if(mysql_num_rows($searchUser) == 0){ echo"No Users Found"; } else { while ($UserSearch = mysql_fetch_array($searchUser)) { echo "$UserSearch[Email_Address]<br/>"; } } } }
-
Hey guys, I'm curious to know how to come about doing something like this ----> http://www.daniweb.com/forums/thread288855.html As you see when you first get to that page a pop up comes up and the screen goes into a lined type of background. Some sites I have seen like fade out. Does anyone know how to do this? I want to do this for pictures that are clicked. Or, if anyone has a better idea please let me know. Thanks, Sean
-
Hey! So I have an app that stores records to a text file. An example of one of the records in the text file is as follows: 10/08/2010|Sean|M|7852546225|7852546225|Dr. Something Each field is separated by a "|". How can I read that text file and each record and put it in a table like this: App Date First Name Last Name Home Number Other Number Doctors Name 10/08/2010 Sean M 7852546225 7852546225 Dr. Something I currently have this: public synchronized static Vector readRecords(String file) throws IOException{ Vector users = new Vector(); BufferedReader in = new BufferedReader( new FileReader(file)); String line = in.readLine(); while (line != null){ StringTokenizer t = new StringTokenizer(line, "|"); String appDate = t.nextToken(); String firstName = t.nextToken(); String lastName = t.nextToken(); String homeNumber = t.nextToken(); String otherNumber = t.nextToken(); String doctorsName = t.nextToken(); User user = new User(appDate, firstName, lastName, homeNumber, otherNumber, doctorsName); users.add(user); line = in.readLine(); } in.close(); return users; } And where I want the stuff to show up I have: <%! String filename = "C:/Users/Sean/Desktop/other.txt"; %> <% java.util.Vector users = Booking.UserIO.readRecords("C:/Users/Sean/Desktop/other.txt"); session.setAttribute("users", users); %> <table border="1" cellspacing="5" cellpadding="5"> <tr> <td>Date</td> <th>Client First Name</th> <th>Client Last Name</th> <th>Client Phone Numbers</th> <th>Doctor</th> </tr> <tr valign="top"> <td><p><%= pageContext.getAttribute("appDate") %></td> <td><p><%= pageContext.getAttribute("firstName") %></td> <td><p><%= pageContext.getAttribute("lastName") %></td> <td><p><%= pageContext.getAttribute("homeNumber") %><br><%= pageContext.getAttribute("otherNumber") %></td> <td><p><%= pageContext.getAttribute("doctorsName") %></td> </tr> </table> The only thing showing up in the table is "null". Hopefully theres an easier way! Thanks in advance, Sean
-
Hey guys, How would I go about having multiple check boxes and where the user can select as many options as they want. Once they check the ones they want, each individual option will go into a database. For example... Choose fruits, Apple Orange Peach Pair Say I put a check beside Apple and Peach, those two values would be entered into the database... ID User_ID Fruit 1 2 Apple 2 2 Peach Thanks, Sean
-
Hey guys, I have been looking for a specific image scroller but I can't seem to find one. I have attached a picture of the one that I would like. I'm assuming I would use javascript If someone has an idea of where I can find one that would be great. I realize that this is quite basic Thanks, Sean [attachment deleted by admin]
-
So something like this? If $loginfo[signupdate] > date('Y-m-d', strtotime('-5 days')) { hide }else{ show }
-
Thanks! Yeah that doesn't seem to tough.. I'll take a look into the adding or sub of days... Thanks again!
-
Hey! So I have an edit profile page going on and certain information shouldn't need to be edited. I want to give the user 5 days to edit data and make sure its right and after the 5 days, it can no longer be edited. Any ideas? I get their signup date when they signup so I imagine it cant be that difficult! Thanks in advance!
-
its picking up there there is a user 7 but it wont display. the reason i know this is because i type in 7 and the message"No Users Found" doesn't come up.
-
Thanks for the reply! I want it so if I type in the user id of 7 in the textbox, my username will show up because I'm user 7. Likewise if i chose screenName as the radio button selection and typed in "Sean", My name would show up along with anyone else who's name is like "Sean". the problem is is that nothing is showing up when i press submit.
-
Sorry heres my form <form action='?SearchUser' method='post'> Search user by:<p/> <input type = 'Radio' Name ='SearchBy' value='UserID'>User ID<br/> <input type = 'Radio' Name ='SearchBy' value='ScreenName'>Screen Name<br/> <input type = 'Radio' Name ='SearchBy' value='Email'>Email<br/> <p/> <input id='ID' type='text' name='ID' /><p/> <input type='submit' name='submit' value='Search'/> </form> When I type a user ID in the ID text box and search, the user wont show up
-
Hey guys, Could someone take a look and please let me know whats wrong? //make picture the profile picture if(isset($_GET['Search'])) { $searchby = $_POST['SearchBy']; $userID = htmlspecialchars(mysql_real_escape_string($_POST['ID'])); if($searchby == "UserID"){ $searchUserID = mysql_query("SELECT * FROM userinfo WHERE User_ID LIKE '".$userID."%'") or die(mysql_error()); $seachUserCount = mysql_fetch_array($searchUserID); if($seachUserCount == 0){ echo"No Users Found"; } else { while ($UserSearch = mysql_fetch_array($searchUserID)) { echo "$UserSearch[user_ID]"; } } } } searchby is the name of a few radio buttons
-
I get my edit_profile.php page with no problems
-
Theres a form. The thing is, the link for the popup is edit_profile.php. after the link is clicked, edit_profile.php turns white with the word [object] on it.
-
Hey, So I have this: echo "<a href=\"javascript:window.open('page.php','name1','height=320,width=240');\">pop-up</a>"; In Chrome, the popup works great, in IE the pop up take a while to popup and then the page itself where the popup link was goes white and says [Object]. Any ideas? Not sure why it doesn't work in IE.
-
Hey, So as of right now i'm escaping characters as follows: $Name = htmlspecialchars(mysql_real_escape_string($_POST['Name'])); When I edit my name to something like this "Sean's" the output will be "Sean\'s" I expected this but how can it just appear as "Sean's" but still escape characters? I know there are some functions and stuff out there or ways around it.. Thanks, Sean
-
Hey thanks for the help! I managed to complete that. I have another question now though. How would I add checkbox values to a table. Like I have 4 checkboxes and the user can select as many as they want. how would I get all those that they checked and add them to my table? The table I guess would look like the one that I showed on my first post Thanks
-
Thanks for the help! Does anyone know how I would resize images as they get uploaded? I mean it would check the image width and length when there being uploaded and if the the size of the photo is small enough then it doesn't have to be resized, otherwise it will have to be resized. Thanks, Sean