Click to See Complete Forum and Search --> : Tag Board script
Tom-E
Jan 21st, 2003, 11:03 PM
I decided to write a tag board script for the fun of it and I stumbled into a bit of trouble.
I am using an iframe to display the taggers messages.
When i make the iframe there is a gap around the inside before the text starts. and it takes away lots of room 5 pixels from top 5 pixels from left and I dont want that wasted. I know i can use the
Div Position or whatever but whenever the new comments are inserted the Div position is pushed back to the very end or to the text it was with and if I add another DIV then there are two messages ontop of each other.
Any help would be great!
Rick Bull
Jan 22nd, 2003, 05:01 AM
I think I understand you, just add style to the page in the iframe. SOmething like this in the <head>:
<style type="text/css"><!--
body {
margin: 0px;
padding: 0px
}
--></style>
I can't remember whether yuo need margin or padding (think it's margin), so you may not need one of those.
The Hobo
Jan 22nd, 2003, 02:55 PM
body {
margin: 0px 0px 0px 0px;
}
Tom-E
Jan 22nd, 2003, 05:17 PM
Thanks so much!!!
I used the by "rick bull" and it worked so there wasn't need to try the second one.
Thank you!
The Hobo
Jan 23rd, 2003, 11:38 AM
Originally posted by Tom-E
Thanks so much!!!
I used the by "rick bull" and it worked so there wasn't need to try the second one.
Thank you!
I've experienced problems in some browsers using just one value. So I always specify a value for each side. Both are valid CSS.
Rick Bull
Jan 23rd, 2003, 12:01 PM
Can you remember which browsers you've have problems in?
Tom-E
Jan 23rd, 2003, 04:59 PM
yah i am using both values
Tom-E
The Hobo
Jan 23rd, 2003, 05:13 PM
Originally posted by Rick Bull
Can you remember which browsers you've have problems in?
No, I don't. It was back in the day when I actually checked my pages in various browsers. So it may have even been fixed already in whatever browser it was.
Tom-E
Jan 23rd, 2003, 08:17 PM
Damn, im having another problem, im running a new p4 windows xp pro computer and I have the newest (from what im aware of) version of php triad. And the $_REQUEST doesnt work at all. So I thought, not a big deal, ill just upload my script to my server for this part. But then it wouldn't write to the tagtext.html file. I changed the permissions and everything seemed to be right but when I submitted my info ($_REQUEST was all working an everything.. then ?page=sent kinda thing) and I went back and refreshed the tag board. All the info in tagtext.html... place where i store the posts it was empty. I tried it with a .txt file to but it didn't seem to work.
Anyone know anything?
Rick Bull
Jan 24th, 2003, 04:34 AM
Have you done a CHMOD on the text file to 777 (or whatever it should be :p)?
phpman
Jan 24th, 2003, 12:35 PM
don't use REQUEST, use POST. also make sure register_globals is off.
also the margin thing doesn't work in Opera and NS4
The Hobo
Jan 24th, 2003, 06:37 PM
Originally posted by phpman
don't use REQUEST, use POST.
Why?
Originally posted by phpman
also the margin thing doesn't work in Opera and NS4
It's standard CSS. I'd have to say that's their problem.
phpman
Jan 24th, 2003, 06:58 PM
REQUEST is not very secure as someone can enter the info in the url and bypass everything you try to stop.
The Hobo
Jan 24th, 2003, 09:01 PM
Originally posted by phpman
REQUEST is not very secure as someone can enter the info in the url and bypass everything you try to stop.
What do I try to stop? :confused:
phpman
Jan 24th, 2003, 09:32 PM
come on Hobo I know you are smarter than that. ;)
if you were expecting a post from a form then use POST, if you use REQUEST a person can bypass your form and get right in. or if they knew the variable name they could also upload a file from a textbox. all they have to do is load it from there site and your form will process it because you used REQUEST instead of POST
it is almost endless considering the REQUEST can handle GET, POST, FILES.
Rick Bull
Jan 25th, 2003, 07:24 AM
I think the margin thing has been fixed in Opera 7 by the way. I'm not sure that it was always broken in eariler versions of opera, but just certain situations. Could be wrong though. And NS 4 is just rubbish for CSS :p
phpman
Jan 25th, 2003, 09:28 AM
it doesn't work in Opera6.01, you have to use the NS4 workaround. and I know that NS4 is rubbish but someone wanted browsers where margins didn't work. :)
Rick Bull
Jan 25th, 2003, 11:56 AM
The good thing about Opera though is that most people that use it are probably pretty good with PCs (otherwise they would have stuck with IE) and will probably upgrade soon. So hopefully it shouldn't take too long for Opera 6 to die out once Opera 7 has come out. At least that's my opinion ;)
The Hobo
Jan 25th, 2003, 02:28 PM
Originally posted by phpman
come on Hobo I know you are smarter than that. ;)
if you were expecting a post from a form then use POST, if you use REQUEST a person can bypass your form and get right in. or if they knew the variable name they could also upload a file from a textbox. all they have to do is load it from there site and your form will process it because you used REQUEST instead of POST
it is almost endless considering the REQUEST can handle GET, POST, FILES.
I hardly think someone's going to want to have a script on their site to post things on his tagboard. :p
Maybe they will to spam him, but if he doesn't have any kind of checking in his script, they might as well just do it from his site.
But I see your point. :)
Tom-E
Jan 26th, 2003, 01:25 AM
Hobo's pretty clever...
Although my problem is solved.
1. The program works perfectly except when I make it on one page instead of two by using the filename.php?var=value
- On my php traid local host.
2. The filename.php?var=value works on my www.skateboard-city.com server but it doesn't write properly.
So basically on two different servers if the worked together then I would have no problem but they dont.
I have already CHMOD-ed my text file but all it does is earase all the data in it. It would not be able to do that if it was no CHMOD-ed correctly... am i correct?
Thanks!
The Hobo
Jan 26th, 2003, 09:57 AM
Do you have MySQL available to you?
MySQL is far better than flat-file.
Tom-E
Jan 26th, 2003, 12:38 PM
Yes I do have Mysql but I have already made 5 different scripts involving mysql and those are the only php scripts I made. I started PHP only because I couldnt find someone to do it for me.
I wanted to try flat file just to learn it so i know it if i need it.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.