Jump to content

Archived

This topic is now archived and is closed to further replies.

SourabhK

Annoying Little Problem... &

Recommended Posts

Hey I have the following code....


[quote]echo "<form method=\"link\" action=\"".$forumpath."login.php?$session[sessionurl]do=logout&amp;logouthash=$logouthash";
echo $vbulletin->userinfo['logouthash'];
echo "\">";
echo "<input type=\"submit\" value=\"Logout\" class=\"submit\" style=\"float: left; font-weight:bold; color:#9C9C9C\"";
echo "\">";
echo "</form>";  [/quote]

Now everything works fine expect for one little mistake in the code generated that pervents the Button Link from taking the user to the corrrect page....

What the above generates is..


[quote]<form method="link" action="http://mydomain.com/forum/login.php?do=logout[color=red][b]&amp;[/b][/color]logouthash=a083030ca9c3acbb17b1e70d136314f6"><input type="submit" value="Logout" class="submit" style="float: left; font-weight:bold; color:#9C9C9C[b]"">[/b][/quote]

The main problem is the thing in bold and red...

instead of creating just one [b]&,[/b] it creates a [color=red][b]&amp;[/b][/color]

Another problem is the second thing in bold it creates two of these: ""
Thats not really a problem since I will be using CSS and removing those after I figure what the problem is...

Anyway any help would be greatly appreciated...

Thank You



Share this post


Link to post
Share on other sites
Is there meant to be something in $session[sessionurl]? Otherwise... whats wrong with?
[code=php:0]
echo "<form method=\"link\" action=\"".$forumpath."login.php?do=logout&logouthash=$logouthash";
[/code]
Your other problem is simple.
[code=php:0]
echo "<input type=\"submit\" value=\"Logout\" class=\"submit\" style=\"float: left; font-weight:bold; color:#9C9C9C";
[/code]

Share this post


Link to post
Share on other sites
Yup that is important...

it contains session data and the like.. basically cookie information
lol thanks for the second one.. im a moron, I can't believe I didn't see that... Thanks

Share this post


Link to post
Share on other sites
You sure its not meant to be $_SESSION then as its showing up blank in your example?

Try...

[code=php:0]
echo "<form method=\"link\" action=\"".$forumpath."login.php?{$_SESSION['sessionurl']}&do=logout&logouthash=$logouthash";
[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.