I want to place a message on the login page, which will say something like in order to view images you will need to register...
how do I do this please?
pageheader($lang_login_php['login']);
$referer = urlencode($referer);
put your code here
echo '<form action="login.php?referer='.$referer.'" method="post" name="loginbox">';
Do i need to enter code or can I just put my message there?
Edit login.php, findpageheader($lang_login_php['login']);
$referer = urlencode($referer);
echo '<form action="login.php?referer='.$referer.'" method="post" name="loginbox">';
and replace withpageheader($lang_login_php['login']);
[tt]?>[/tt]
Your custom text goes here
<?php
$referer = urlencode($referer);
echo '<form action="login.php?referer='.$referer.'" method="post" name="loginbox">';
You can replace Your custom text goes here
in that example with just text or HTML. No need to write PHP code there, as the line ?> is actually a command that means "parsing of PHP will stop, plain HTML will be read. The line <?php
turns the PHP mode back on.
Alternatively, you could replacepageheader($lang_login_php['login']);
$referer = urlencode($referer);
echo '<form action="login.php?referer='.$referer.'" method="post" name="loginbox">';
withpageheader($lang_login_php['login']);
$referer = urlencode($referer);
echo 'Your message here';
echo '<form action="login.php?referer='.$referer.'" method="post" name="loginbox">';
, which would mean that you wouldn't be ending and restarting PHP-processing - your message would be written on the login page using PHP's command "echo".
Either way, I don't think that it's really necessary to write on the login page that you have to register first - that should be pretty self-explanatory, as this is the case on all sites that require authentification. In my opinion, your site visitors will know that they need to register first before they can log in.