Jump to content

dannyb785

Members
  • Posts

    544
  • Joined

  • Last visited

Everything posted by dannyb785

  1. And as for table-based layouts... BAD! Tables don't display until everything in them has been loaded. When you go to myspace, you will notice that heavy profiles take a while to show even though the background and header links show up right away. That's bc the header and main content are 2 main tables that control all of the content. using div tags to layout everything show as they are loaded(plus are wayyy easier to quickly modify with your something.css file)
  2. In general, you want to have element properties defined in a css file if the manipulated item appears on more than 1 page. If there's a certain table or whatever that you're modifying that will only appear on that one page, it's not a big deal to directly modify the tag with the style="" . Anything else though should be in a something.css file that is included in the head tags. As for how to setup a page, you need to think of your page as sections. Like use phpfreaks for example, you'd have the header section(where the logo is). then you have the gray bar section that says "hello username" and the date. etc etc and then you make div tags for each. Then back in your something.css file you'd have stuff like #header { background:url('image.jpg'); height:value;} and so on. So a quick layout of phpfreaks would be <div id="header"> </div> <div id="greeting"> Welcome username <span>date</span> </div> <div id="forum_info"> links and stuff </div> so on and so on
  3. provided each input checkbox have a unique name(I usually do it something like name="p$ad_id" that way every add has a different name): use the current() and next() functions to loop through the selected items. For example: while(current($_POST) != "") { $id = current($_POST); print_ad_info($id); // this will be whatever you want to display for the given ad id next($_POST); } OR to avoid a possible infinite loop, I always add a hidden input field at the end of the checkboxes with a value that the ads would never have(like -1000). So I'd add <input value="-1000" name="checker"> so then the while statement would change to: while(current($_POST) != "-1000") { same code as before }
  4. It appears to be fine. Test it by commenting out the mail function and doing: echo "$mails3[address]<br>\n"; that way you can see all of the email addresses that would be emailed(provided the mail function works)
  5. Oh well in that case, you should check your server before posting it as a problem. You didn't say that you weren't using your server to try to email.
  6. The better thing to do is make the submit button a type=button and then execute the js onclick. then after all things are correct(after checking w/ js), then do "this.form.submit();" to send it thru. If I remember correctly, if you do onsubmit, it will submit the data whether its correct or not
  7. ^ in a nutshell... alt="" wasn't original designed to be displayed when you hover over an image. alt is for when text can't be displayed, the alt value displays. FF and others do it right by not showing alt things, so, like the above poster said, you need to have it in the title=""
  8. I tried the code and I see a hand when I hover. But if it doesnt show up for you, do: onMouseOver="this.style.cursor='pointer'"
  9. see if this gets you what you want: <html> <head> <title>Template</title> <style type="text/css"> <!-- #wrapper { border:1px solid black; height:100%; position:absolute; left:5%; width:90%; } #header { border-top: #000000 thin solid; border-left: #000000 thin solid; border-right: #000000 thin solid; position:absolute; left:5%; top:30px; width:90%; height:178px; } #nav { border-left: #000000 thin solid; border-bottom: #000000 thin solid; position:absolute; left:5%; top:208px; width:18%; height:512px; } #content { border-right: #000000 thin solid; border-bottom: #000000 thin solid; position:absolute; left:23%; top:208px; width:72%; height:512px; } --> </style> </head> <body> <!-- <div id='header'> </div> <div id='nav'> </div> <div id='content'> </div> --> <div id="wrapper"> </div> </body> </html>
  10. is the table of contents on the same page as the text fields and submit button? If so, use some ajax to get it done.
  11. Do you mean to center the tex field itself? or the text inside the field? If its the text field, then look above this post. If it's the text itself, add text-align:center; to the style paramaters in the input field.
  12. I'll just resay it. DON'T USE FRAMES. EVER. seriously. ever. There's never a beneficial reason to using them.
  13. if it works in FF but not in IE then its not a php problem, it's just one of those annoying things IE doesnt do that it should. You'll need to lookup a different way to display the button image. Like for example do an image tag and then include "onclick='this.form.submit()'" try that out.
  14. You need to contact your hosting provider. That's an issue they should be able to help with.
  15. htmlentities and filtering aside, there's no reason there should be an error when html tags are input. When you say there is an error, what kind of error is it?
  16. This fixed the problem. Everything works fine! Thank you!
  17. Can't you just figure the url out once you submit an ad? You'd submit it, copy the url, then edit it to change the img tag's url and you should be fine.
  18. Are these registered users that are chatting? If so, when you do the check for the message being submitted twice, check that it's the same user also (Adding "AND user='$whatever'" in the query). So that if sue says "Hi" and then bob says "hi" back, his message isnt blocked
  19. All you would do(if I read this correctly..) would be: send the entire url into the id variable, then break it apart to get the "1234". For example:, exploding all the "sys/" in the variable into, say $temp and then exploding the . in the $temp[1] variable into, say, $temp2. Then $temp2[0] would have the 1234. That's how I break them up anyways. there's probably an easier way, like with preg_replace.
  20. ah ha. You know, in all the time I've worked with php(about a year and a half) I've never worked with cookies. Looks like I'm gonna have to! I'll look into it, but if anyone else has other ideas, please let me know. But thanks for that! That's probably what I'm gonna need to do.
  21. Hi all, I'm building a site for a client and I have a poll feature that they can include on pages. The way I have it set up right now is that when a user(always anonymous) makes a vote on a poll, the current session is recorded to have voted for that poll, so that it won't show up again if the page is viewed(so that they cant vote more than once). However, if the user exits the window, they can easily open a new one and go to the page and vote again(I dont want this). I would like to make it instead where the user's ip address is recorded so a user can't vote twice in the same day. Problem is, since most user's coming to this site are college students, most of the time they will be using the university's wireless and therefore would all have the same ip address. Is there any other way to uniquely identify a visitor that way even if 2 are visiting with the same ip, that they can be differentiated?
  22. Or you could just escape the quotes within the echo. Not really a big deal.
  23. ^ not really a big deal long as she escapes the input. I agree on making the variable smaller. I don't care how good you are at php, splitting up a variable that huge would be way too much to keep track of.
  24. while it may work, it certainly isnt necessary. Did you try what I said about just single quotes around the variable? And my lord, can't you split up that variable into something smaller??
  25. ^ lol. whats funny about that is that I assumed that his reply(that said problem solved) was the guy who first suggested help but was saying "I need to wake up, my bad".
×
×
  • 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.