open All Channels
seplocked EVE Technology Lab
blankseplocked forms processing hints
This thread is older than 90 days and has been locked due to inactivity.

Author Topic

Tooth Pick
Posted - 2003.06.14 12:58:00 - [1]

after much searching of all the fan sites and the eve boards, I've had to resort to some techniques that showed me what variables from a form were passing to my scripts.

I haven't tested the get method, but I did test the post method. And this one simple result should astound you, but at the same time allow lots of you to intelligently create in game forms based pages that work.


how did I come to that conclusion?
well I made a simple calculator for processing two numbers via an operand. I had 2 buttons, "Calculate" and "All Clear". In the normal browser (external to eve), everything worked fine. Inside of eve it did not. By printing the post variable array contents out, I discovered that the only function of the button in the forms processed by EVE is to take all the names of the fields of the form minus all the buttons and send them to your script.

So, in order to get around not having button capability, it would be wise to make use of checkboxes and radio buttons. I'll use radio buttons as they fit my need more closely.

and below is my script without the radio buttons that work. It's in php, so for those of you that have been looking for a how did they do that thing then this might be for you. I would give you the link to where I host it, (on me) but then i probably wouldn't be able to play with everyone tapping my server and soaking up my bandwidth.

basic calculator script:
*** NOTE: There is more than one way to implement any solution, you might not like my way of doing it or think there is a better way, just feel free to post alternate scripts here so others might learn from you, but in advance don't flame me because of style or lack of knowledge. thank you. ***

$value1 = $_POST['value1'];
$value2 = $_POST['value2'];
$operator = $_POST['operator'];
$errormsg = "Output<br>\n";
if(!$value1) {
$errormsg .="Must enter a value for First Value.<br>\n";
elseif(!is_numeric($value1)) {
$errormsg .="Must enter a number for First Value.<br>\n";
else {

if(!$operator) {
$errormsg .="Must enter an operator.<br>\n";
else {
if($operator == "*" || $operator == "/" || $operator == "-" || $operator=="+") {
else {
$errormsg .="Operator must be one of \"*/-+\"<br>\n";

if(!$value2) {
$errormsg .="Must enter a value for Second Value.<br>\n";
elseif(!is_numeric($value2)) {
$errormsg .="Must enter a number for Second Value.<br>\n";
else {

if($retry_value1 && $retry_Operator && $retry_value2) {
switch($operator) {
case "*":
$my_result = intval($value1) * intval($value2);
case "/":
$my_result = $value1 / $value2;
case "-":
$my_result = $value1 - $value2;
case "+":
$my_result = $value1 + $value2;

echo "<FORM NAME=\"Calculator\" METHOD=\"POST\" ACTION=\"/calculator.php\" >";

$form_value = "First Value: <INPUT TYPE=\"text\" SIZE=\"30\" NAME=\"value1\" ";
if($retry_value1) {
$form_value .="value=\"$value1\" ";
echo $form_value . ">";
echo "<br>";

$form_value = "Operator: <INPUT type=\"text\" size=\"2\" name=\"operator\" ";
if($retry_Operator) {
$form_value .= "value=\"$operator\" ";
echo $form_value . ">";
echo "<BR>";

$form_value = "Second Value: <INPUT TYPE=\"text\" SIZE=\"30\" NAME=\"value2\" ";
if($retry_value2) {
$form_value .= "value=\"$value2\" ";
echo $form_value . ">";
echo "<br>";

echo "<INPUT TYPE=\"submit\" NAME=\"submit\" VALUE=\"Calculate\">";

echo "</FORM>\n";

echo "<hr>";
echo $errormsg;
echo "Result = $my_result";
echo "<hr>";

Lu Tze
Posted - 2003.06.15 23:48:00 - [2]

A different question for you...

What does the corprole header translate to? I'm doing an AND op on it, but what are the role settings?

Does that make sense?

Tooth Pick
Posted - 2003.06.17 23:09:00 - [3]

go there for headers and corp roles, there are a couple of sample pages too. I don't remember how to AND something, not without going through all my books again. but you should be able to make a simple variable array with all the role values in it. then attempt to subtract from the highest value to the lowest saving the remainder if the remainder is positive or 0, stopping on 0 and skipping if negative value.

remember there is a 1000 ways to program stuff.

Sam Sneak
Posted - 2003.07.06 11:46:00 - [4]


i discovered that while their image tag says that it didn't support gif's, if i simply renamed the file as a jpg it got through <EVEHTML>

d ArkAngel
Posted - 2003.09.21 21:50:00 - [5]

yes, I've run accross the problem a number of times as well.

my problem is related to

I've been heading towards making it eve frindly, and I've been writing a conversion of phpBB to work in eve as well

it's about 99% working, but uses can't create polls because you can't have a add button, and a sumbit post button on the same form.

for all the other instances I've managed to work arround with hidden feilds, and having more than one form. if you just want to clear all, then you probably don't need all the values to be submitted to that second button, so just put it in a second form tag with a hidden input with something like name="mode" value="clear" to catch in you serverside code

It's a bug with the form submition, I've submitted a bug report, but they won't fix it I woulnd't think, they've got too many other things to fix like systme crashes, member hangers and what ever is broken at the moment, use web developers quibbling about their eve browser is thier last concern I'm sure :) (as right it should be, it's not a web browser they've written after all :) )

good luck with the work arround, ane if you need any help with things let me know and I'll see if I can help :)

(PS I'm selling my time for both real money and ISK if people are interested in any advanced functionality for ingame sites.)


This thread is older than 90 days and has been locked due to inactivity.


The new forums are live

Please adjust your bookmarks to

These forums are archived and read-only