How to I create a forum that has a set value?
Example: <input="<?$variable?>" name="variable">
<input type="submit">
How to I create a forum that has a set value?
Example: <input="<?$variable?>" name="variable">
<input type="submit">
hey,
it would look something like:
notice the ; after the $var, you must have this in thereCode:Example: <input="<?PHP $var; ?>" name="var"> <input type="submit">
Last edited by Slothie; 11-12-2007 at 03:14 AM. Reason: Automerged Doublepost
Easiest 70 points you'll make on x10
Feel free to add my reputation by clicking on theif you found my post helpful to you :P
If I am not responding to your PMs, that means I am ignoring you. Take a hint.
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
Slothie is right, if you want it to be a set value you don't need php for that.
Or if you want a textareaHTML Code:<input type="text" name="variable" value="yourSetValue" />
And last is a radio/checkboxHTML Code:<textarea name="variable">yourSetValue</textarea>
HTML Code:<input type="radio" name="variable" value="theRadioValue" checked />
Last edited by Thewinator; 11-12-2007 at 03:20 AM.
1stly you would create a Forum using forum software.
2ndly to create a form you could do the following:
FORM.php
ENGINE.phpPHP Code:<html>
<head>
</head>
<body>
<form method="post" action=ENGINE.php">
<select name="drop_down">
<option value='' ="selected">Please Select A Option</option>
<option value="opt_1">option 1</option>
</select>
<input type="text" size="50" maxlength="30" name="fullname" />
<input type="submit" value="Submit" name="submit">
</form>
</body>
</html>
PHP Code:<html>
<head>
</head>
<body>
<?php
if (!isset($_POST['drop_down'];))
{
echo 'The required field is empty, click back and retry.'; ?>
<form>
<input type ="button" name ="back" value="Go Back" onclick="history.go(-1)">
</form>
<?php
} else
{
$drop_down = $_POST['drop_down'];
$fullname = $_POST['fullname'];
// do what ever you want with these varibles/scalars
}
?>
</body>
</html>
Last edited by DefecTalisman; 11-12-2007 at 03:47 AM.
http://dev.x10hosting.com (this has nothing to do with x10hosting)
->All us helpful people here at x10hosting would like to reach our next user groups, "Community Paragon". Please click the+rep icon on the left hand side of a post if that post was helpfull.