Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Mar 2011
    Posts
    147
    Thanks
    35
    Thanked 0 Times in 0 Posts

    URGENT{no php code working at all}

    I apologize in advance for the long block of code, but I have a giant problem. none of the php on my page is working for some reason.

    Does anyone have any idea why?


    Please help me this is really important i resolve this ASAP

    Thanks

    Code:
    <?php
    include 'hudson/dbconnect.php';
    echo'asdf';
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    	<head>	
    		
    		<title>Xonic Games / Beta Sign Up</title>
    		<!-- Include -->
    		<!-- 
    			For more information or questions, please visit contact us at xonicgames@gmail.com
    			Your feedback is greatly valued!
    		-->
    		
    		<!-- Meta Property -->
    		<meta property="og:site_name" content="Xonic Games"/>
    		<meta property="og:url" content="http://www.xonicgames.com"/>
    		<meta property="og:type" content="website"/>
    		<!-- /Meta Property -->
    		
    		<!-- Xonic Games -->
    		<meta http-equiv="Content-Type" content="text/html" charset="UTF-8"/>
    		<meta name="description" content="Beta 1.0 Phase of Xonic Games"/>
    		<meta name="keywords" content="games, free, upload, share"/>
    		<!-- /Xonic Games -->
    		
    		<!-- Stylesheets -->
    		<link href="splash/style/global.css" media="screen" rel="stylesheet" type="text/css"/>
    		<link href="splash/style/reset.css" media="screen" rel="stylesheet" type="text/css"/>
    		<link href="splash/style/header.css" media="screen" rel="stylesheet" type="text/css"/>
    		<link href="splash/style/index.css" media="screen" rel="stylesheet" type="text/css"/>
    		<link href="splash/style/footer.css" media="screen" rel="stylesheet" type="text/css"/>
    		<!-- /Stylesheets -->
    		
    		<!-- Internal Styling -->
    		<style type="text/css">			
    		</style>
    		<!-- /Internal Styling -->
    		
    		<script type="text/javascript">
    
    		dateFuture = new Date(2011,5,29,19,0,0);
    		var d_day, d_hour, d_min;
    
    		function GetCount(){
    
    			dateNow = new Date();
    			amount = dateFuture.getTime() - dateNow.getTime();
    			delete dateNow;
    			
    			days=0;
    			hours=0;
    			mins=0;
    			out="";
    
    			amount = Math.floor(amount/1000);
    
    			days=Math.floor(amount/86400);
    			amount=amount%86400;
    
    			hours=Math.floor(amount/3600);
    			amount=amount%3600;
    
    			mins=Math.floor(amount/60);
    			amount=amount%60;
    			
    			if(days < 10){
    				d_day = '0' + days;
    			}
    			else{
    				d_day = days;
    			}
    			if(hours < 10){
    				d_hour = '0' + hours;
    			}
    			else{
    				d_hour = hours;
    			}
    			if(mins < 10){
    				d_min = '0' + mins;
    			}
    			else{
    				d_min = mins;
    			}
    
    			out = d_day + " " + d_hour + " " + d_min;
    			
    			document.getElementById('countbox').innerHTML=out;
    
    			setTimeout("GetCount()", 1000);
    		}
    
    		window.onload=function(){GetCount();}
    
    		</script>
    	</head>
    	<body>
    		<div id="page">
    			<div id="page-wrap">
    				<div id="empty-margin"></div>
    				<!-- mastHead -->
    				<div id="mastHead">
    					<div class="top">
    						<h1>Xonic Games</h1>
    					</div>
    					<div class="counter">
    						<span class="counter-title">
    							Release Date:
    						</span>
    						<span class="counter-module">
    							<div id="cd_container">
    								<span id="countbox">
    								
    								</span>
    								<br />
    								<div id="cd_labels">
    									<table>
    										<tr>
    											<td class="td_big">
    												days
    											</td>
    											<td class="td_small">
    											</td>
    											<td class="td_big">
    												hours
    											</td>
    											<td class="td_small">
    											</td>
    											<td class="td_big">
    												minutes
    											</td>
    										</tr>
    									</table>
    								</div>
    							</div>
    						</span>
    					</div>
    				</div>
    				<!-- /mastHead -->
    				<!-- Content -->
    				<div id="content" class="clear">
    					<div class="desc">
    						<p>
    							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Xonic Games is a video hosting website designed to allow professional gamers to upload their recordings. Xonic's goal is to give professionals the opportunity to provide high quality gaming content including reviews, gameplay, and tutorials and get rewarded for
    							it. <br />
    							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; You can sign up for a BETA account now and get access to Xonic Games the moment it is released. We look forward to seeing you June 29th, at 7:00pm PST.
    						</p>
    					</div>
    					<div class="signup">
    						<!-- Sign Up Container -->
    						<div class="signup-container">
    							<?php
    							include 'error.php';
    							
    							if($error == 0){
    								?>
    							<form method="POST" action="">
    								<ul class="nav">
    									<li class="label">
    										<label for="user">Username:</label>
    									</li>
    									<li class="input">
    										<input type="text" name="username" maxlength="32"/>
    									</li>
    								</ul>
    								<ul class="nav">
    									<li class="label">
    										<label for="pw">Password:</label>
    									</li>
    									<li class="input">
    										<input type="text" name="password" maxlength="40"/>				
    									</li>
    								</ul>
    								<ul class="nav">
    									<li class="label">
    										<label for="email">Email:</label>
    									</li>
    									<li class="input">
    										<input type="text" name="email" maxlength="60"/>
    									</li>
    								</ul>
    								<ul>
    									<li class="submit">
    										<input type="submit" name="submit" value="Sign Up"/>
    									</li>
    								</ul>
    							</form>
    								<?
    								}
    								else if($error == 1){
    								
    									$i = 1;
    									while($i < 6){
    										echo $errors[$i];
    										$i++;
    									}
    								?>
    								<br />
    								<br />
    							<form method="POST" action="">
    								<ul class="nav">
    									<li class="label">
    										<label for="user">Username:</label>
    									</li>
    									<li class="input">
    										<input type="text" name="username" maxlength="32"/>
    									</li>
    								</ul>
    								<ul class="nav">
    									<li class="label">
    										<label for="pw">Password:</label>
    									</li>
    									<li class="input">
    										<input type="text" name="password" maxlength="40"/>				
    									</li>
    								</ul>
    								<ul class="nav">
    									<li class="label">
    										<label for="email">Email:</label>
    									</li>
    									<li class="input">
    										<input type="text" name="email" maxlength="60"/>
    									</li>
    								</ul>
    								<ul>
    									<li class="submit">
    										<input type="submit" name="submit" value="Sign Up"/>
    									</li>
    								</ul>
    							</form>
    								<?
    								}
    								else if($error == 2){
    									mysql_query("INSERT INTO users (username, password, email) VALUES ('" . $username . "', '" . sha1($password) . "', '" . $email . "')");
    								?>
    								Thank you for registering with Xonic. <br />
    								You're account will be activated upon our website's release.
    								<?
    								}
    								?>
    						</div>
    						<!-- /Sign Up Container -->
    					</div>
    				</div>
    				<!-- /Content -->
    				<!-- Footer -->
    				<div id="footer">
    				
    				</div>
    				<!-- /Footer -->
    			</div>
    		</div>
    	</body>
    </html>
    <?
    
    ?>

  • #2
    Banned
    Join Date
    Feb 2011
    Posts
    2,699
    Thanks
    13
    Thanked 395 Times in 395 Posts
    Since you have marked this urgent, what day and time (GMT) do you need a solution by?

  • Users who have thanked bullant for this post:

    maxhud (06-01-2011)

  • #3
    Regular Coder
    Join Date
    Mar 2011
    Posts
    147
    Thanks
    35
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by bullant View Post
    Since you have marked this urgent, what day and time (GMT) do you need a solution by?
    I really need it by 830 pst which just passed.

    Thank you.

    I have 2 people waiting to sign up

  • #4
    Regular Coder
    Join Date
    Mar 2011
    Posts
    147
    Thanks
    35
    Thanked 0 Times in 0 Posts
    Here is the page:

    http://xonicgames.com/

  • #5
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,439
    Thanks
    62
    Thanked 537 Times in 524 Posts
    In what way is it not working? - Does the code not function as expected or does it simply not run at all (EG you can see php in the html via the browser?).

    You need to be a lot more specific about your problem especially if you want this solved by a deadline.
    See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/

    Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!

  • #6
    Regular Coder
    Join Date
    Mar 2011
    Posts
    147
    Thanks
    35
    Thanked 0 Times in 0 Posts
    I just figured it out.

    The file was origionally an HTML file and I forgot to change it to a .php file


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •