Log in

View Full Version : Form woes...


gengar003
09-24-2003, 01:51 AM
Okay, I've got this code:

$tid=$HTTP_GET_VARS['tid'];
$templates=$DB_site->query_first("SELECT templateid,title,template FROM template WHERE templateid=$tid");
$title=$templates['title'];
$contents=$templates['template'];
$contents2=htmlspecialchars($contents);;

echo "<font size=\"5\">";
echo "Editing Template: ";
echo $title;
echo "</font><p><hr>";
echo "<form action=\"edittemplate.php\" method=\"GET\">";
echo "<input type=\"hidden\" name=\"action\" value=\"editing\">";
echo "<input type=\"hidden\" name=\"title\" value=\"$title\">";
echo "<input type=\"hidden\" name=\"templateid\" value=\"$tid\">";
echo "<textarea name=\"template\" rows=\"23\" cols=\"53\">";
echo $contents2;
echo "</textarea><p>";
echo "<input type=\"submit\" value=\"Submit!\" name=\"submit\">";
echo "</form>";

Which creates an editing form for a given template.
It works for simple templates, like the errormessages, but not on complicated ones, most notably showthread.

What can I do to make it work for showthread and other "complicated" templates?

Why? I need this for after shcool... And I leave for the bus @ 8:20, and I get on the comp ~ 8:00.

Thanks in advance.

:ermm: :ermm: Vb3 gives me too much information.

SmEdD
09-24-2003, 02:51 AM
Probley because showthread is template that calls more then one template. The error template uses phrases now so it is only one template.

If I had time I'd fix your code but I got to get to bed ;)

gengar003
09-24-2003, 11:56 AM
*hopes that SMED can fix it soon*