Title: PHP code breaks
Last modified: August 21, 2016

---

# PHP code breaks

 *  Resolved [AngelikWebDesigns](https://wordpress.org/support/users/angelikwebdesigns/)
 * (@angelikwebdesigns)
 * [12 years ago](https://wordpress.org/support/topic/php-code-breaks/)
 * I’ve got some PHP code that was written for a site. bradentonpress.com
    it is
   not working correctly. can anyone take a look at the code and tell me if anything
   is wrong?
 * here is the code
 * <?php
 * //login script;
 * require(‘connect.php’);
 *  $query=”SELECT id, firstname, lastname from login where email=’$login’ and password
   =’$password'”;
    $result=@mysql_query ($query);
 *  $row=mysql_fetch_array($result);
 *  $clientid=$row[‘id’];
    $firstname=$row[‘firstname’]; $lastname = $row[‘lastname’];
 * mysql_close();
 * //set the cookie
    if (!empty($firstname)) { setcookie (‘id’,$clientid); setcookie(‘
   firstname’,$firstname); setcookie (‘lastname’,$lastname); //now redirect the 
   pag, so the cookie becomes active header(‘Location: login3.php’);
 * } else {require(‘header.php’);
    require(‘nologin.php’); require(‘footers.php’);
   end; } require(‘header.php’); ?>
 * <html>
    <head>
 * <title>Bradenton Press Leaders in Quality Printing, Copying and Design in Bradenton
   </title>
    <meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-
   1″> <link href=”styles.css” rel=”stylesheet” type=”text/css”> </head>
 * <body>
    <p class=”Links”>
 * </p>
    <table width=”80%” border=”0″ cellspacing=”0″ cellpadding=”5″> <tr> <td
   width=”30%” valign=”top”><p align=”center” class=”Headline”>Welcome <?php print(“
   $firstname”) ?></p> <p class=”bodytext”><?php print(“$message”) ?></p> <p> </
   p></td> <td width=”70%” valign=”top”><table width=”420″ border=”0″ cellspacing
   =”0″ cellpadding=”0″> <tr> <td width=”28″ valign=”top”><p class=”Headline”>You
   are now logged in.</p> <p class=”bodytext”>To send a file, [click here.</p> <
   p class=”bodytext”>To request a quote, [click here.</p> <p class=”bodytext”>To
   view your proofs, [click here.</p>
 *  <?php
    //conditional if they have an online catalog
 *  if(!empty($online_ordering)) {print(“<p class=\”bodytext\”>To access your Online
   Ordering catalog, [click
    here.
   </p>”);}
 *  ?>
 *  </td>
    </tr> <tr> <td> </td> </tr> </table>
 *  </td>
    </tr> </table> <table width=”80%” border=”0″ cellpadding=”0″ cellspacing
   =”0″ bgcolor=”#000000″> <tr> <td> </td> </tr> </table> </body>
 * <?PHP require(‘footers.php’) ?>
    </body> </html>

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [12 years ago](https://wordpress.org/support/topic/php-code-breaks/#post-4764979)
 * Can you provide more information as to what’s not working?
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [12 years ago](https://wordpress.org/support/topic/php-code-breaks/#post-4764981)
 * I don’t see how this relates to WordPress though.
 *  Thread Starter [AngelikWebDesigns](https://wordpress.org/support/users/angelikwebdesigns/)
 * (@angelikwebdesigns)
 * [12 years ago](https://wordpress.org/support/topic/php-code-breaks/#post-4765116)
 * Hi Andrew its a site that was cannabolized by a larger competitor. The plan is
   for the site to be transferred to new hosting and rebuilt on wordpress. This 
   particular code is not a “plugin” but rather part of the original HTML. Since
   its not working now I cant really tranfer it to wordpress and guarantee it would
   work. Basically, I’m trying to figure out if its an easier battle just to say
   scrap the whole thing and start over as opposed to repair and migrate.
 *  Thread Starter [AngelikWebDesigns](https://wordpress.org/support/users/angelikwebdesigns/)
 * (@angelikwebdesigns)
 * [12 years ago](https://wordpress.org/support/topic/php-code-breaks/#post-4765117)
 * The site is [bradentonpress.com](http://bradentonpress.com) when you visit the
   site it requires login. When an active customer attempts to login using name 
   and password it sends a confirmation email but doesnt actually let you access
   the site.
 *  [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * (@catacaustic)
 * [12 years ago](https://wordpress.org/support/topic/php-code-breaks/#post-4765144)
 * > Basically, I’m trying to figure out if its an easier battle just to say scrap
   > the whole thing and start over as opposed to repair and migrate.
 * Scrap the whole thing. Two reasons for this:
    1. You already know that the code doesn’t work, so why waste time fixing it if 
       you’re going to move to a differnt system anyway?
    2. There’s various pre-built plugins that work great that will give you the same
       functionality without the need for you to do any programming or debugging.
 *  Thread Starter [AngelikWebDesigns](https://wordpress.org/support/users/angelikwebdesigns/)
 * (@angelikwebdesigns)
 * [12 years ago](https://wordpress.org/support/topic/php-code-breaks/#post-4765146)
 * Thanks and a very good point

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘PHP code breaks’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 3 participants
 * Last reply from: [AngelikWebDesigns](https://wordpress.org/support/users/angelikwebdesigns/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/php-code-breaks/#post-4765146)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
