Need a code for...
Moderator: General Moderators
Need a code for...
Hello, I am trying to make a site in which users are able to upload videos etc, sort of like youtube, but I am in need of a code that will allow users to create user names etc and be able to login to their account to upload and manage videos. Anyone have a link to a code in which i can find a code that will do this for me? (just a code to create accounts etc, i can figure out how to edit it into the video part)
feyd | Please use
and I keep getting this error...
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/morpiaco/public_html/videos.php:3) in /home/morpiaco/public_html/videos.php on line 94
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/morpiaco/public_html/videos.php:3) in /home/morpiaco/public_html/videos.php on line 94
Anyone know what is up? this is my entire code...
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I am trying to use this code:Code: Select all
<?php
//This will start a session
session_start();
$username = $_SESSION['username'];
$password = $_SESSION['password'];
//Check do we have username and password
if(!$username && !$password){
echo "Welcome Quest! <br> <a href=login.php>Login</a> | <a href=register.php>Register</a>";
}else{
echo "Welcome ".$username." (<a href=logout.php>Logout</a>)";
}
?>Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/morpiaco/public_html/videos.php:3) in /home/morpiaco/public_html/videos.php on line 94
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/morpiaco/public_html/videos.php:3) in /home/morpiaco/public_html/videos.php on line 94
Anyone know what is up? this is my entire code...
Code: Select all
<html>
<HEAD>
<?php
if (isset($_GET['page'])) {
$page = $_GET['page'];
}else{
$page = "main"; } ?>
<title>Morpia | Video Space</title>
<meta name="revisit-after" CONTENT="1 days">
<meta name="robots" content="index,all">
<meta name="robots" content="index,follow">
<meta name="keywords" content="video,sharing,entertainment,fun,free,video clips,multimedia,upload videos,upload,video space">
<meta name="description" content="Morpia - Share and upload videos to the Morpia Video Space.">
<LINK href="/style.css" type=text/css rel=StyleSheet>
</HEAD>
<BODY>
<table cellSpacing="0" cellPadding="0" width="830" align="center" border="0">
<tr>
<th width="830" height="120" background="/image/morpia.jpg">
</th>
</tr>
<tr>
<td width="830" bgColor="#097DC7" height="10">
</td>
</tr>
</table>
</td></tr></table>
<TABLE align="center" cellSpacing=0 cellPadding=0 width=830 border=0>
<td width="100%" bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF"><tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="8" bgcolor="#FFFFFF"><tr><td width="150" valign="top">
<div class="hpContentBlock">
<div class="headerRCBox">
<b class="rch">
<b class="rch1"><b></b></b>
<b class="rch2"><b></b></b>
<b class="rch3"></b>
<b class="rch4"></b>
<b class="rch5"></b>
</b> <div class="content" align="center"><span class="headerTitle">Navigation</span></div>
</div>
<div class="contentBox">
<div>
<?php
$conn = mysql_connect('localhost', 'morpiaco_site', '******') or die ('Error connecting to mysql:' . mysql_error());
mysql_select_db('morpiaco_site') or die(mysql_error());
$query = "SELECT `nav` FROM `nav`";
$result = mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
echo $row['nav'] . '<br />';
}
mysql_close($conn);
?>
</div></div>
</td>
<td>
<table>
<tr>
<td width="680" valign="top">
<div class="hpContentBlock">
<div class="headerRCBox">
<b class="rch">
<b class="rch1"><b></b></b>
<b class="rch2"><b></b></b>
<b class="rch3"></b>
<b class="rch4"></b>
<b class="rch5"></b>
</b>
<div class="content" align="center"><span class="headerTitle">Morpia Video Space</span></div>
</div>
<div class="contentBox">
<div>
<p>
<?php
//This will start a session
session_start();
$username = $_SESSION['username'];
$password = $_SESSION['password'];
//Check do we have username and password
if(!$username && !$password){
echo "Welcome Quest! <br> <a href=login.php>Login</a> | <a href=register.php>Register</a>";
}else{
echo "Welcome ".$username." (<a href=logout.php>Logout</a>)";
}
?>
<?
$display = $page;
$display .= ".php";
include($display);
?>
</p>
</div>
</div>
</td></tr>
</table>
<BR><BR><BR>
<table width=100%>
<tr><td>
</td></tr>
</table>
</td></tr></table></td></tr></table>
</td>
<tr>
<td bgcolor="#EA9A10" height="2px"></td><td bgcolor="#EA9A10" height="2px"></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" height="3px"></td><td bgcolor="#FFFFFF" height="3px"></td>
</tr>
</BODY></HTML>feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]-
nickvd
- DevNet Resident
- Posts: 1027
- Joined: Thu Mar 10, 2005 5:27 pm
- Location: Southern Ontario
- Contact:
Please understand that we will never write the script for you, it seems that that is what you are expecting.
From your posts here, it seems that you have 3 options.
1) Buy a good php book and read it twice, then come back to ask questions
2) Use an existing CMS system that does exactly what you want
3) Pay someone to write it for you.
From your posts here, it seems that you have 3 options.
1) Buy a good php book and read it twice, then come back to ask questions
2) Use an existing CMS system that does exactly what you want
3) Pay someone to write it for you.
-
nickvd
- DevNet Resident
- Posts: 1027
- Joined: Thu Mar 10, 2005 5:27 pm
- Location: Southern Ontario
- Contact:
The headers already sent "error" is THE most asked about question in any and every single php discussion board on the internet, and if you are not able to find the answer on your own, then how can you expect to write your own or even use someone elses script. We're here to help you, not teach from the ground up.morpia wrote:Obviously, you didn't even read my last or first posts. Don't be a smart ass, I asked if anyone knew a link to a site that had a script (not to make one for me) and the last post asked if anyone knew what the error was caused by.
Case closed.