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:[email protected]">[email protected]</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
https://forums.phpfreaks.com/topic/71034-solved-printf-arguments/
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

Archived

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

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