Jump to content

rrmosby

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

rrmosby's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Regular frames do not work with the layout I have, and I'm already using target attributes.
  2. Sorry about the nondescript title but I couldn't think of anything to relate to this situation. I want to make a nice site for dad for his birthday, but it's starting to turn into a mess! I have a Gallery2 installation of his art on his site and I was wondering if there was any way to have a page not refresh when a link is clicked, yet just refresh a certain part in the page. This may sound complicated but what I'm wanting to do is Web page: +-------+ +-------+ | gallery | | album | | -intro. | | page- | +-------+ +-------+ When someone clicks a thumbnail on the album page, I want it to open in the first box. +------+ +-------+ | photo | | album | | page. | | page- | +------+ +-------+ Original solution: I tried doing this by using the first box (gallery intro/photo page) as an iframe. The second box was an overscroll div box. Problem: When I would click a navigational link (First/Previous/Next/Last) on the album page, it would refresh the entire page, sending the photo page back to the gallery intro, when I wanted it to stay on the photo page. Next solution: I tried turning the album page box also into an iframe, because I knew the photo page wouldn't refresh when I clicked a navigation link on the album page. Problem: I just feel like now I'm making things much too complicated, because if I want to click an Edit link on either page, it's going to open in that small iframe, which isn't big enough for all that. If I tell the Edit link to open up on the whole page (target="_top") then what are they going to get if they happened to click 'back'? If I put a link for them to go back, I'm not going to be able to get the whole iframe pages set back up, it won't be the right photo page in the first box and it may not be the right page in the album box. It'd probably go back to the gallery intro page and the first page of the album. It also would be a pain to tell Gallery2 that only the Edit pages should have a full layout and use the main part of the Edit page as an overscroll div rather than an iframe. I don't want to use Flash because I don't know how to incorporate Gallery2 into Flash, and I've been told it doesn't integrate very well. I'm hesitant to use Javascript but I'm willing if it's necessary. I wouldn't mind PHP because most the pages are already PHP, but I don't know enough of the code to know how I could apply it to this situation. I've wracked my brain and tried various different things and my headache is only growing, so I've come here to ask for second opinions.
  3. I'm just going to go with if (!is_int($ID) || ($ID) < 0). Thank you.
  4. I want the user to know that what they're trying to do isn't going to be accepted (rather than the script just replacing unallowed characters and the user thinking it's been entered successfully as is). I want to prevent abuse more this way, and make sure more of the things entered are legit (which I have to manually confirm later, but this process helps narrow things down). I'm not sure if I should be using something that can detect any periods, or if there's something I can tack on to $ID (like example($ID)) that will ensure that this is a whole number, no decimals involved. The $ID > 0 works well to ensure that it's not a negative, but it wouldn't be the same with decimals (2.5 > 0).
  5. Oh! I hadn't thought of that, excellent! What about for decimals and how to prevent them?
  6. If they put a -1029872 or a 1972.982 it doesn't trigger the !is_numeric error message (like "19872asdf8" would). I'm going to implement the code you gave me (thank you!) now.
  7. I thought trim only got rid of spaces at the beginning or end, not in the middle?
  8. I have a few questions, pertaining to a script I'm trying to write in PHP. I am a bit of a newb so I don't understand techno-talk, but I'll try and keep up if any respond. Here's the situation: I'm doing this page where people can insert information into the database. Because it's public, the information goes into another table than the real one, so that I can be a moderator and approve the information. Also, I log the contributor's IP address into the table, so that if they try to abuse the page, I can IP ban them. When they click the Submit button, I have a few if statements that the information has to go through in order to succeed. This is what I'm going for (in essence): if (!is_numeric($ID) || or contains hyphens || or contains periods || matches ID from real table || matches ID from temp table) 1. I want the ID to be only numbers--if it's not, they get an error telling them it has to be. The problem with is_numeric is they could put a negative number or a decimal for an ID and the script will accept it, so I thought I could ask the if statement to also check if there's hyphens or periods. 2. I also want it to check to see if the ID is already listed in the temp table this will be going into. 3. I also want it to check and see if the ID is already listed in another table in the same database. Anyone have any ideas?
×
×
  • 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.