Jump to content

[SOLVED] printf(""); arguments


Mr P!nk

Recommended Posts

hello

 

im having a wierd problem with printf(""):

when i upload this index page it comes up with the error

 

Warning: printf(): Too few arguments in /home/public_html/pidgeon-house/index.php on line 112

 

I dont understand what i have to do for it to print  :-\

 

any suggestions?

<body topmargin="0" leftmargin="0">
<table width="800" height="614" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td width="27%" rowspan="3" bgcolor="#B7CA33" scope="col"><img src="images/global_nav_bg.gif" width="152" height="600" />
            <div id="Layer1">
                <table width="98%" border="0" cellpadding="0" cellspacing="4" class="licence">
                    <tr>
                        <th scope="col"><p align="left" class="licence">Designed by Acme Art<br />
                            All rights reserved<br />
                            <a href="mailto:admin@domain.co.uk">admin@domain.co.uk</a></p>
                                <p align="left" class="licence"><br />
                                        <br />
                                    Licensed to: XYZ Company</p></th>
                    </tr>
                </table>
            </div>
        </td>
        <th height="305" scope="col"><img src="login/images/login_header.gif" alt="" width="648" height="316" border="0"></th>
    </tr>
    <tr>
        <td height="14"><p> </p>
        </td>
    </tr>
    <tr>
        <td height="252">

            <form method="post" action="index.php">

            <p> </p>
		 <?php
	// if login/pass exists
	if($isAuth && isset($submit)){
		printf("<div id=\"system\">You have logged in successfully. <a href=\"layout.php\">Go to Layout selection</a></div>");
	} // if login/pass does not exist 
	else if(!$isAuth && isset($submit)){
		printf("<div id=\"system\">Login unsuccessful. Check your details and <a href=\"index.php\">try again</a></div>");
	}
	// if not logged in
	if(!isset($submit)){

		printf("
            <table width=\"33%\" height=\"101\" border=\"0\" align=\"center\" cellpadding=\"2\" cellspacing=\"2\">
                <tr>
                    <td height=\"58\" scope=\"col\"><p align=\"center\">Username
                        <input name=\"username\" type=\"text\" class=\"loginText\" id=\"username\" size=\"15\" maxlength=\"15\" />
                                    <br />
                                    <br />
                        Password
                        <input name=\"password\" type=\"password\" class=\"loginText\" id=\"password\" size=\"15\" maxlength=\"15\" />
                    </p></td>
                </tr>
                <tr>
                    <td scope=\"col\"><div align=\"center\" ><img src=\"login/images/login_btn.gif\" width=\"126\" height=\"29\" /></div></td>
                </tr>
            </table>" ); // Line 112  <---------------------------------------------------------
}
?>
   </form>	
</td>
    </tr>
    <tr>
        <td height="19" bgcolor="#B7CA33"> </td>
        <td> </td>
</tr>
</table>
</body>

 

Thanks

P!nk

Link to comment
Share on other sites

why i did not think of that in the first place, i will never know!

 

thanks for pointing out the obvious. (in a non sarcastic way)

 

but what would be great is if you/someone could explain as to why it was throwing me that error?

 

once again thankyee darkfreaks

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.