View Full Version : posting without a form?

08-10-2007, 02:25 AM
I have about 100+ input values that I want to store in mysql. Not all of them are in a form. All the examples I see on the internet are for inputs only in forms. What do I need to add to these inputs to post them without putting them in a form? I will have a submit button at the bottom that gathers all the inputs and posts them on another page. Is it possible to post without a form even?

<input id="blogcolor>
<textarea id"=aboutmeblog">some text</textarea>
<Select id="textalignselect">
<Option value="left">left</Option>
<Option value="center" selected="selected">center</Option>
<Option value="right" >right</Option>

Len Whistler
08-10-2007, 07:00 AM
You must have a form to go with your submit button, some fields can be hidden with a set value or value from a database. Study the code below, it should give you an idea of what to do.


$first_name = $_POST["first_name"];
$last_name = $_POST["last_name"];
$hidden_value = $_POST["hidden_value"];
echo "Thanks for applying $first_name $last_name $hidden_value";
<br />
</table><br />
<form method="post" action="<?php echo $PHP_SELF;?>">
First Name: <input type="text" size="30" maxlength="30" name="first_name" /><br /><br />
Last Name: <input type="text" size="30" maxlength="30" name="last_name" /><br /><br />
<input type="hidden" size="30" maxlength="30" value="secret word" name="hidden_value">
<input type="submit" value="submit" name="submit" /><input type="reset" value="clear" />

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum