login problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
csgirl
Forum Newbie
Posts: 3
Joined: Thu Apr 22, 2010 7:50 am

login problem

Post by csgirl »

Hello!

I am trying to link a web page to irc server through PJIRC. I have my webpage login.html which has a form for user nick and password that connects to "chat.php" file. The chat applet is loading fine, but the nick parameter from the login page is not getting to the chat.php file. I have tried php tags and all but nothing seems to work. I am pasting the form code here and also the two ways i have tried to take the nick param to pjirc applet.

login.html

Code: Select all

<form  action="chat.php" method="post" name='login' id="login" onsubmit="this.nick.value=cleanCAPS(this.nick.value, 8); return true;">

<span class="style32">Your Nick:</span>
<input name="nick" type="text" onchange="this.value=cleanCAPS(this.value, 8);" value='' size="18" maxlength="13" />

chat.php
This does not work and the error i get on pjirc applet checker is nick parameter empty

Code: Select all

<applet code=IRCApplet.class width=942 height=439 align="top" archive="irc.jar,pixx.jar">
          <param name="CABINETS" value="irc.cab,securedirc.cab,pixx.cab">
          <param name="nick" value="<?$username ?>" >
</applet>
I also tried putting php in the tags but i got the same error as above

Code: Select all

<applet code=IRCApplet.class width=942 height=439 align="top" archive="irc.jar,pixx.jar">
          <param name="CABINETS" value="irc.cab,securedirc.cab,pixx.cab">
          <param name="nick" value="<?php $username ?>" >
</applet>
I want anyone to tell me what is wrong with my code and also if there is any other way of bringing nick from the login page to chat applet.
csgirl
Forum Newbie
Posts: 3
Joined: Thu Apr 22, 2010 7:50 am

Re: login problem

Post by csgirl »

ok now i have tried this

Code: Select all


         <param name="nick" value="<?php ($_POST['nick']) ?>">
          
          
          <param name="alternatenick" value="<?php ($_POST['nick']) ?>">
          
</applet>

But still i get the error in applet checker as "nick parameter defined but empty"
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: login problem

Post by social_experiment »

Have you tried $_POST['nick'] (without php tags) ?
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Post Reply