• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Little HTML help here

Sunner

Elite Member
How do I make a form with an action that consists of an URL to a php page with a variable sent along, such as <form action="blah.php?foo=bar>.
When I do it like that, everything behind the ? is ignored.
 
You need to upload the form using HTTP POST, not HTTP GET (which is the default). This works:
<form action="test.php?option=rawr" method="POST"> ... </form>

If you use GET, "option" will be killed, because HTTP GET transmits options by adding them to the URL in just that way. HTTP POST is a true upload. If you don't want to use POST for some reason, you can, of course, create a hidden field in the form:
<input type="hidden" name="option" value="rawr" />

That would do the same thing. Note that the way you access those variables also can depend on the way you let the user upload them - there's one superglobal array for each GET and POST, namely $_GET and $_POST. However, there's also an array $_REQUEST which takes all user-posted variables; if you use that, there'd be no changes necessary.
 
Thanks a bunch 🙂

Oh, and while Im asking, another question
Is there any way to specify an image to replace that boring button with a custom image?
 
Yep.

<input type="image" src="foo.png" /> (HTML 3.2 style)

<button type="submit"><img src="foo.png" /></button> (HTML 4.0 style)

Note that the latter method is universal, you can enclose mostly anything by the button tags, but older browsers like Netscape 4.x don't understand it yet.
 
Ok, one last question 🙂

When using the <button type...> tag, all browsers put the button image inside a "regular grey" button, making one very big, and very very ugly button with a smaller button inside.
I assume this is avoidable.

Oh and by the way, you wouldn't happen to know of a good HTML reference online, found a few when searching google, but they weren't terribly useful, if I had a good one, maybe I wont have to bug you 🙂
 
Hmm. I don't think you can remove the gray button (which indeed looks horrible) with pure HTML, but it's easy to remove it with CSS:

<button style="border:0; background-color:white;"> ... </button>

Tested in Mozilla, Opera and IE. Central CSS definition in the header or an extra file works fine, too.

As for the reference, in fact I do have an excellent online one, SelfHTML, probably the best I've seen so far - but unfortunately it's in German. I did a brief look in the Google category, this reference for both HTML4 and CSS seems to be quite solid, and it's in English, too. 😉
 
Back
Top