Jump to content


Photo

Annoying Little Problem... &


  • Please log in to reply
3 replies to this topic

#1 SourabhK

SourabhK
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 05 July 2006 - 12:16 AM

Hey I have the following code....


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>"; 



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..


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


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

instead of creating just one &, it creates a &amp;

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





#2 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 05 July 2006 - 12:29 AM

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


#3 SourabhK

SourabhK
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 05 July 2006 - 12:37 AM

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

#4 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 05 July 2006 - 01:17 AM

You sure its not meant to be $_SESSION then as its showing up blank in your example?

Try...

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





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users