Jump to content

chriscloyd

Members
  • Posts

    488
  • Joined

  • Last visited

Everything posted by chriscloyd

  1. try the link again i edited it http://www.chaoslegionclan.net/CEGL-Work/newsite/index.php?p=register
  2. http://www.chaoslegionclan.net/CEGL-Work/newsite/index.php?p=register yes that link i showed u shows you the form even when i eneter info into the required ones which r username password confirm password email confirm email i still get the errors heres my updated code <?php include("config.php"); //check required fileds //username password c_password email c_email $reason = array(); $username = $_POST['username']; $password = $_POST['password']; $c_password = $_POST['c_password']; $email = $_POST['email']; $c_email = $_POST['c_email']; if (empty($username)) { $reason[] = '-You did not submit a username.'; } if (empty($password)) { $reason[] = '-You did not submit a password.'; } if (empty($c_password)) { $reason[] = '-You did not submit a email address.'; } if (empty($email)) { $reason[] = '-You did not submit a password.'; } if (empty($c_email)) { $reason[] = '-You did not submit a confirmation email address.'; } if (!empty($reason)) { $reasons = implode("<br>",$reason); header("Location: ../index.php?p=register&error=".$reasons); } ?>
  3. no if u have web hosting and it has cpanel you can simply run it through cron there
  4. When i do that its showing all the errors go here http://www.chaoslegionclan.net/CEGL-Work/newsite/index.php?p=register and try to fill in just the user name it comes back with all the errors not just the password c-password email and c-email
  5. should i put <br> after then too to make new line
  6. <?php include("config.php"); //check required fileds //username password c_password email c_email if ($_POST['username'] == '') { $error = '1'; $reason = '-You did not submit a username.'; } if ($_POST['password'] == '') { $error = '1'; $reason = '-You did not submit a password.'; } if ($_POST['c_password'] == '') { $error = '1'; $reason = '-You did not submit a email address.'; } if ($_POST['email'] == '') { $error = '1'; $reason = '-You did not submit a password.'; } if ($_POST['c_email'] == '') { $error = '1'; $reason = '-You did not submit a confirmation email address.'; } if ($error) { //return to register page and display reasons } ?> say if they did not fill in any of those fields I want to go back and show all the errors when i do it, it was only showin 1 error
  7. Okay im trying to do something that seems very hard that i cant even think of how to do it as of right now. Okay. I have 80 teams in a league i created im trying to run a script to make each team get matched up to 8 random teams how could i go about doing this
  8. I think i found the problem in my link i did "" right after id so it wasnt catching the id i echoed
  9. okay heres my problem im get a var $for_id when i echo it by its self it shows but when i echo it in a link it wont show heres my code <link href="cl.css" rel="stylesheet" type="text/css"> <?php include("config.php"); //viewtopic.php $topic_id = $_GET['id']; $topic_info = mysql_query("SELECT * FROM cl_topics WHERE top_id = '$topic_id'"); $topic = mysql_fetch_array($topic_info); $old_top_views = $topic['top_views']; $top_views = $topic['top_views'] + 1; mysql_query("UPDATE cl_topics SET top_views = '$top_views' WHERE top_id = '$topic_id' "); $forum_id = $topic['for_id']; $forum_info = mysql_query("SELECT `for_title` FROM cl_forum WHERE for_id = '$forum_id'"); $forum = mysql_fetch_array($forum_info); $mod_all = mysql_query("SELECT * FROM cl_moderators WHERE for_id = '$forum_id'"); $mod = mysql_fetch_array($mod_all); $mod_num = mysql_num_rows($mod_all); if ($mod_num > 1) { $show_mod = 'Moderator: '; } else { $show_mod = 'Moderators: '; } echo '<a href="forums.php" class="headerright">Chaos Legion Forums</a><br> -> <a href="viewforum.php?id="'; echo $topic['for_id']; echo '" class="headerright">'.$forum['for_title'].'</a><br> --> <span class="headerright">'.$topic['top_title'].'</span> '; ?> <a href="javascript:void();" class="style1" onClick="show_hide('topic')">+/-</a> <? if ($mod['username'] == $_SESSION['cluser']) { echo '<img src="images/topic_delete.gif" width="20" height="18" border="0" /> <img src="images/topic_move.gif" width="20" height="18" border="0" /> <img src="images/topic_lock.gif" width="20" height="18" border="0" />'; } echo '<br><br><br>Start Test for $topic[for_id]<br>'; echo $topic['for_id']; echo '<br>End Test for $topic[for_id]<br><br><br>'; //get all topics and post numbers and what not echo '<div id="topic">'; echo '</div>'; echo '<br><br><a href="posttopic.php?id='.$forum_id.'"><img src="images/newtopic.gif" width="82" height="25" border="0" alt="Post new topic"></a> <a href="postreply.php?id='.$topic_id.'"><img src="images/reply.gif" width="82" height="25" border="0" alt="Post reply"></a>'; ?> to view what im talking about and the actual code check here try clicking on general forum thats what im trying to echo it in http://www.chaoslegionclan.net/viewtopic.php?id=1
  10. like heres the link http://www.chaoslegionclan.net/index.php if u look at the links on comments.php?id=L it says and where it says posted by: L on : L
  11. okay heres my problem when i have my output echoed its showing L heres my code <?php $dbhost = 'localhost'; $dbuser = '******'; $dbpass = '******'; $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql'); $dbname = '******'; mysql_select_db($dbname); //news// $get_news = mysql_query("SELECT * FROM `cl_news` ORDER BY `news_id` DESC LIMIT 0 , 5"); if ($get_news) { while ($news = mysql_fetch_assoc($get_news)) { $title = $news['news_title']; $news = $news['news_message']; $author = $news['news_author']; $date = $news['news_date']; $id = $news['news_id']; ?> <table width="100%" border="0" cellspacing="1" cellpadding="0"> <tr> <td colspan="2" class="headerright"><?php echo $title; ?> <a href="javascript:void();" class="style1" onclick="show_hide('<?php echo $id; ?>')">+/-</a></td> </tr> </table> <table id="<?php echo $id; ?>" width="100%" border="0" cellspacing="1" cellpadding="0"> <tr> <td colspan="2" class="contentright"><?php echo $news; ?></td> </tr> <tr> <td width="68%" class="contentright">Posted on : <?php echo $author; ?><br> On : <?php echo $date; ?><br> </td> <td width="32%" class="contentright"><a href="view_news.php?id=<?php echo $id; ?>">Comments (0)</a> </td> </tr> </table> <?php } } else { echo 'Theres no news to display right now. Sorry for the inconvenience.'; } ?> but on phpmyadmin i did the query because theres only 1 news article in there this is what shows up SQL query: SELECT * FROM `cl_news` LIMIT 0, 15 ; Rows: 1 news_id news_title news_author news_date news_views news_message 1 This is a test news haqshot Wednesday, February 28, 2007 2:52pm 0 Lorem ipsum dolor sit amet, consectetuer adipiscin...
  12. i have virtual deciated server with no control panel and i put xampp on it
  13. I got this error while trying to use "that domain isn't in my list of allowed rcpthosts" php mail() anyone know how to fix it
  14. Fatal error: Call to a member function file1() on a non-object in /home/srxstud/public_html/test22/includes/porfolio_getfunctions.php on line 55
  15. Okay i have some functions in my php class but im tyring to call a function from inside my class like below but it does not work heres my code [code]<?php class getproject { private $id;     function __construct() { if (!isset($_GET['project'])) { $get_project = mysql_query("SELECT * FROM projects ORDER BY id DESC"); $pid = mysql_fetch_assoc($get_project); $this->id = $pid['id']; } else { $this->id = $_GET['project']; }     } function name() { if ($result = mysql_query("SELECT `title` FROM projects WHERE id = '{$this->id}'")) { if (mysql_num_rows($result) > 0) { $row = mysql_fetch_assoc($result); return $row['title']; } } } function type() { if ($result = mysql_query("SELECT `type` FROM projects WHERE id = '{$this->id}'")) { if (mysql_num_rows($result) > 0) { $row = mysql_fetch_assoc($result); return $row['type']; } } } function start() { if ($result = mysql_query("SELECT `startdate` FROM projects WHERE id = '{$this->id}'")) { if (mysql_num_rows($result) > 0) { $row = mysql_fetch_assoc($result); return $row['startdate']; } } } function enddate() { if ($result = mysql_query("SELECT `enddate` FROM projects WHERE id = '{$this->id}'")) { if (mysql_num_rows($result) > 0) { $row = mysql_fetch_assoc($result); return $row['enddate']; } } } function file1() { if ($result = mysql_query("SELECT `location` FROM project_screenshots WHERE pid = '{$this->id}'")) { if (mysql_num_rows($result) > 0) { $row = mysql_fetch_assoc($result); return $row['location']; } } } function file2() { if ($result = mysql_query("SELECT `location` FROM project_screenshots WHERE pid = '{$this->id}' AND id != '{$project->file1()}")) { if (mysql_num_rows($result) > 0) { $row = mysql_fetch_assoc($result); return $row['location']; } } } } ?>[/code]
  16. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''1','2'' at line 1
  17. heres my error im getting Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\includes\liveprojects.php on line 12 heres the code i have [code]<?php $get_num_project = mysql_query("SELECT * FROM projects WHERE status = 'Completed'"); $num_project = mysql_num_rows($get_num_project); if ($num_project <= 5) { $maxlimit = 5; $minlimit = 1; } else { $maxlimit = rand(6,$num_project); $minlimit = ($maxlimit - 5); } $project_get = mysql_query("SELECT * FROM projects WHERE status = 'Completed' LIMIT '$minlimit','$maxlimit'"); while ($p = mysql_fetch_array($project_get)) { echo '<table width="95%" border="0" cellspacing="0" cellpadding="0">   <tr>     <td width="85%">'.$p['title'].'</td>     <td align="center" width="15%"><a href=protfolio.php?project='.$p['id'].'">View</a></td>   </tr> </table>'; } ?>[/code]
  18. heres my error [quote]Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/srxstud/public_html/test22/includes/liveprojects.php on line 7 [/quote] heres my code [code]<?php $get_num_project = mysql_query("SELECT * FROM projects WHERE status = 'Completed'"); $num_project = mysql_num_rows($get_num_project); $maxlimit = rand(1,$num_project); $minlimit = $maxlimit - 5; $project_get = mysql_query("SELECT * FROM projects WHERE status = 'Completed' LIMIT '$minlimit','$maxlimit'"); while ($p = mysql_fetch_assoc($project_get)) { echo '<table width="95%" border="0" cellspacing="0" cellpadding="0">   <tr>     <td width="85%">'.$p['title'].'</td>     <td align="center" width="15%"><a href=portfolio.php?project='.$p['id'].'">View</a></td>   </tr> </table>'; } ?>[/code]
  19. Hi there, Right now i have a script that uploads an image to my server.  Im having trouble makeing the script to make it a thumbnail ,  so pretty much a problem creating two copies of the file im uploading and making one a thumbnail heres my script so far can someone help me out? [code] <?php include("../config.php"); $id = $_GET['id']; $get_project = mysql_query("SELECT * FROM projects WHERE id = '$id'"); $project = mysql_fetch_assoc($get_project); $pclient = $project['clientid']; $get_client = mysql_query("SELECT * FROM users WHERE id = '$pclient'") or die(mysql_error()); $client = mysql_fetch_array($get_client); $pname = $client['first'].' '.$client['last']; $file_name = $HTTP_POST_FILES['screenshot']['name']; $random_digit = rand(0000,9999); $new_file_name = "$pname.$random_digit.$file_name"; $path= "screenshots/".$new_file_name; $pid = $_GET['id']; copy($HTTP_POST_FILES['screenshot']['tmp_name'],$path); mysql_query("INSERT INTO project_screenshots (`pid`,`name`,`location`) VALUES ('$pid','$new_file_name','$path')"); header("Location: ../projects.php?page=viewproject&id=$id"); ?> [/code]
  20. how do i find out if its php 5
  21. heres the error im getting Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/srxstud/public_html/test22/includes/porfolio_getfunctions.php on line 4 heres my code [code] <?php class getproject { private $id;     function __construct() { if (!isset($_GET['project'])) { $get_project = mysql_query("SELECT * FROM projects ORDER BY id DESC"); $pid = mysql_fetch_assoc($get_project); $this->id = $pid['id']; } else { $this->id = $_GET['project']; }     } function name() { if ($result = mysql_query("SELECT `title` FROM projects WHERE id = '{$this->id}'")) { if (mysql_num_rows($result) > 0) { $row = mysql_fetch_assoc($result); return $row['title']; } } } function type() { if ($result = mysql_query("SELECT `type` FROM projects WHERE id = '{$this->id}'")) { if (mysql_num_rows($result) > 0) { $row = mysql_fetch_assoc($result); return $row['type']; } } } function start() { if ($result = mysql_query("SELECT `startdate` FROM projects WHERE id = '{$this->id}'")) { if (mysql_num_rows($result) > 0) { $row = mysql_fetch_assoc($result); return $row['startdate']; } } } function enddate() { if ($result = mysql_query("SELECT `enddate` FROM projects WHERE id = '{$this->id}'")) { if (mysql_num_rows($result) > 0) { $row = mysql_fetch_assoc($result); return $row['enddate']; } } } function file1() { if ($result = mysql_query("SELECT `location` FROM projects_files WHERE pid = '{$this->id}'")) { if (mysql_num_rows($result) > 0) { $row = mysql_fetch_assoc($result); return $row['location']; } } } function file2() { if ($result = mysql_query("SELECT `location` FROM projects_files WHERE pid = '{$this->id}'")) { if (mysql_num_rows($result) > 0) { $row = mysql_fetch_assoc($result); return $row['location']; } } } } ?> [/code]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.