Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbee Moved code page not working 1

Status
Not open for further replies.

evr72

MIS
Dec 8, 2009
265
US
Hello,

I am very new at php. I was trying to make some changes to a php page, I think I move some code and now the page won't load. I was wondering if anybody could give me a hand?
Code:
?><?php 	  $v_admin_username ='Username/Email' ;	  $v_admin_password = 'password'; 	  ?>      <form name="frm_login" action="" method="post">      <div id="login-content">            <?php 		if($_REQUEST['msg']!='') {		?>        	<div class="notification information png_bg">				<div><?php echo $mess[$_REQUEST['msg']];?></div>            </div>		<?php        }        ?>          <p>        <label>Username</label>        <input class="text-input" name="v_admin_username" id="v_admin_username" value="" type="text" onblur="fill_field_email('v_admin_username','Username/Email');" onfocus="blank_field_email('v_admin_username','Username/Email');" onmouseover="blank_field_email('v_admin_username','Username/Email');" onmouseout="fill_field_email('v_admin_username','Username/Email');" />      </p>          <div class="clear"></div>          <p>        <label>Password</label>        <input class="text-input" name="v_admin_password" id="v_admin_password" type="password" blank_field_email('v_admin_password','password'); onfocus="blank_field_email('v_admin_password','password');" onmouseover="blank_field_email('v_admin_password','password');" onmouseout="fill_field_email('v_admin_password','password');"  />      </p>          <div class="clear"></div>          <a href="forgot_password.php">Forgot password?</a> <span>      <input  type="submit" name="submit" id="submit" onclick="return check('v_admin_username','v_admin_password');"value="Sign In" class="button" />      </span>          </div>  </form>  <br /><br />  <br /><br />    <!-- End #login-content -->           </div></body></html><?PHP

I appreciate it!!!
 
Make sure you have error reporting set and error display turned on.
 
jpadie, I am not sure what that means, I am honestly really new to php and programming
 
That code is such swiss cheese that I'd ask your web host to see if they have a backup that can be restored.

Is this really the start of the file?

Code:
?><?php
 
This
Code:
[red][b]?>[/b][/red]

Is the closing tag for PHP,
and this:

Code:
[red][b]<?PHP[/b][/red]

Is the opening tag for PHP. If that is the entirety of your code, then you have a closing tag but no opening tag, and then you have an opening tag that is never closed nor has anything inside it.

Remove the first ?> and the ending <?PHP and that should make the page load again.

As word of caution, if you are so new to PHP that you don't even see these simple errors, I suggest you don't mess around with the code.

----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
if you are new to PHP I would also add that this code does not strike me as a good example. the only thing I would expect anyone to learn from this is how not to code.


I do not Have A.D.D. im just easily, Hey look a Squirrel!
 
I appreciate all your input, I have been reading on PHP,very powerful. If you know how to use it. I agree with both Vacunita
and IPGuru, I should read a bit more before I start messing around with my live code.

Also Tank you Vacunita, I did what you suggested and it worked again


 
If I were you I would look at putting xampp on your local machine and download the site and play with it there.

If you can't stand behind your troops, stand in front of them.
Semper Fidelis

Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top