need help with new host.

Discussion in 'PHP' started by darktick13, Jan 30, 2009.

  1. #1
    Hello everyone i'm restarting a website I had many years ago and let fall off. I still have the old pages and it worked before but doesn't seem to want to work now. I am now hosting with godaddy and I would like to know if someone could help me by looking at my code and tell me what i need to do differently. I had php 5.x installed instead of php4 should i use php4 instead? here is the code.

    
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title><?php print $content." Music Merchandise";  ?></title></title>
    
    </head>
    <body>
    <?php if ($bands == "") { $bands = "bands"; } else { $bands = $bands; } ?>
    <?php if ($content == "") { $content = "online"; } else { $content = $content; } ?>
    	<table width="100%" height="100%">
    		<tr align="center">
    			<td align="center" valign="middle" colspan="4"><img alt="MusicMerchandiseOnline" align="middle" src="logo.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
    		</tr>
    		<tr align="center">
    			<!-- by alpha -->
    			<td height="154" align="center" valign="top"><img align="top" src="alpha.gif" /><br />
    		  <a href="index.php?bands=0">#</a> - <a href="index.php?bands=ab">a</a> - <a href="index.php?bands=b">b</a> - <a href="index.php?bands=c">c</a> - <a href="index.php?bands=d">d</a> - <a href="index.php?bands=e">e</a> - <a href="index.php?bands=f">f</a> - <a href="index.php?bands=g">g</a> - <a href="index.php?bands=h">h</a><br /> - <a href="index.php?bands=i">i</a> - <a href="index.php?bands=j">j</a> - <a href="index.php?bands=k">k</a> - <a href="index.php?bands=l">l</a> - <a href="index.php?bands=m">m</a> - <a href="index.php?bands=n">n</a> - <a href="index.php?bands=o">o</a> - <a href="index.php?bands=p">p</a><br /> - <a href="index.php?bands=q">q</a> - <a href="index.php?bands=r">r</a> - <a href="index.php?bands=s">s</a> - <a href="index.php?bands=t">t</a> - <a href="index.php?bands=u">u</a> - <a href="index.php?bands=v">v</a> - <a href="index.php?bands=w">w</a> - <a href="index.php?bands=xyz">xyz</a></td>
    			
    			<td width="46%" align="center" valign="top"><a href="othersite"></a></td>			
    			
    			<!-- by genre -->
    			<td width="27%" align="center" valign="top"><img align="top" src="genre.gif" /><br /><a href="index.php?bands=rock">rock</a> - <a href="index.php?bands=rap">rap/r&amp;b</a> - <a href="index.php?bands=pop">pop</a> - <a href="index.php?bands=country">country</a></td>
    		
    		
    		</tr>
    		<tr align="center">
    			<td width="17%" align="left" valign="top"><?php include ($bands.".html") ?></td>
    			<td align="center" valign="top"><?php include ($content.".html") ?></td>			
    			<td width="17%" align="left" valign="top"></td>
    		</tr>
    </table>	
    </body>
    </html>
    
    Code (markup):
    if you guys want to see the actual page just msg me, since i don't know the regulations as far as putting a link in the post.
     
    darktick13, Jan 30, 2009 IP
  2. mallorcahp

    mallorcahp Peon

    Messages:
    141
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Just looking at it quickl $content hasn't been given any value ...
    Are you sure there is not a <?php include('somefile.php') ; ?> or something missing ...
    Maybe this file is included in another file that is the main script ...
     
    mallorcahp, Jan 30, 2009 IP
  3. darktick13

    darktick13 Peon

    Messages:
    54
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    it is given a value of "online"
     
    darktick13, Jan 30, 2009 IP
  4. darktick13

    darktick13 Peon

    Messages:
    54
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    it is given a value of "online"
     
    darktick13, Jan 30, 2009 IP
  5. mallorcahp

    mallorcahp Peon

    Messages:
    141
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    $content is given the value "online" if it is Null ... otherwise it is assigned $content ... and same goes for $bands;

    Somewhere you should presumably have

    either in a config file or something ... if not, assign them in the "if" statements ...

    and see if that works ...
     
    mallorcahp, Jan 30, 2009 IP
  6. darktick13

    darktick13 Peon

    Messages:
    54
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    that didn't work either. and yes i want content to be online if it equals null. because on the main page i want it to start with a certain selection then after they click an option in the menu i want it to select a different page. also do you know if globals has to be on? and how do i get that turned on through godaddy? website address is musicmerchandiseonline_com
     
    darktick13, Jan 30, 2009 IP
  7. Syfonic

    Syfonic Peon

    Messages:
    452
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Well, there are new features and functions with PHP5. Some of the key features (from PHP.net's news archive):

    * The Zend Engine II with a new object model and dozens of new features.
    * XML support has been completely redone in PHP 5, all extensions are now focused around the excellent libxml2 library.
    * A new MySQL extension named MySQLi for developers using MySQL 4.1 and later. This new extension includes an object-oriented interface in addition to a traditional interface; as well as support for many of MySQL's new features, such as prepared statements.
    * SQLite has been bundled with PHP. For more information on SQLite.
    * A brand new built-in SOAP extension for interoperability with Web Services.
    * A new SimpleXML extension for easily accessing and manipulating XML as PHP objects. It can also interface with the DOM extension and vice-versa.
    * Streams have been greatly improved, including the ability to access low-level socket operations on streams.

    Overall, though, most things have remained the same. Scripts that are created to run with PHP4 should work fine with PHP5 if you are considering upgrading. However, there are some compatibility issues:

    List of Backward Incompatible Changes Between PHP4 and PHP5:
    http://us3.php.net/manual/en/migration5.incompatible.php
    Code (markup):
    For more information, check out the PHP4 / PHP5 migration FAQ:
    http://us3.php.net/manual/en/faq.migration5.php
    Code (markup):
    PHP5 ChangeLog:
    http://www.php.net/ChangeLog-5.php
    Code (markup):
     
    Syfonic, Jan 30, 2009 IP
  8. darktick13

    darktick13 Peon

    Messages:
    54
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    i changed it back to php4 now but still doesn't work. don't know if php4 has been put into effect yet or not. hoping it hasn't and that will fix my problem.
     
    darktick13, Jan 30, 2009 IP