Jump to content

gastooon

Members
  • Posts

    11
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

gastooon's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Haha, that is just stupid. Been circling around that for hours! Thanks alot!!
  2. So I have a huge problem with probably a simple solution. But after hours of searching on google I gave up. Here is my problem... I have a date in my phpmyadmin that output like this 2014-01-20 but I want it to output like this 20 January, 2014. It's "event_startdate" and "event_enddate" that I want to change. Here is my code... $event_list = ""; $sql = mysql_query ("SELECT * FROM events ORDER BY event_startdate ASC"); $eventCount = mysql_num_rows($sql); // Count number of rows to outpout. if($eventCount > 0){ while($row = mysql_fetch_array($sql)){ $id = $row["id"]; $event_name = $row["event_name"]; $event_startdate = $row["event_startdate"]; $event_enddate = $row["event_enddate"]; $event_place = $row["event_place"]; $event_list .= ' <div class="eventlistpage"> <a href="event.php?id=' . $id .'"> <p id="eventNameBox">' . $event_name . '</p> <p>' . $event_startdate . '</p> <p>' . $event_enddate . '</p> <p>' . $event_place . '</p> </a> <div class="clear"></div> </div>'; } } else { }
  3. Okey this might be messy to understand when I explain but I will give it a shot. In my db I got account type "member", "VIP" and "Admin" now I want to add a button that only is visible for say "Admin" and lets call the page admin.php. If lets say a "member" try to enter the admin.php page by enter "www.domain.com/admin.php" they will get kicked back to the home. if anyone know how to do this please help me! Thank you for trying!
  4. I replaced the picture and it doesn't show me anything then , it feels like it doesn't know in which id it should pick it from even tough it should
  5. Now I don't follow, you want me to put the default picture in the $id folder? why do that ? the picture isn't the problem cause have tried with several diffrent accounts.
  6. Yes it's getting the id, echo worked perfectly
  7. ohh didn't see that myself but it didn't change a thing :/ still only show the standard picture ..
  8. Hello! My problem is that in my forum I want to display the picutre of their user and if they do not have a picture I want to show the standard one. I got all of this working on another part of the page but for some reason I can only get it to display the standard picture and not their custom picture... The code looks like this: <?php // Now query any responses out of the database and place in a dynamic list $sqll = mysql_query("SELECT id FROM myMembers"); while($row = mysql_fetch_array($sqll)){ $id = $row["id"]; $check_pic = "..//members/$id/image01.jpg"; $default_pic = "..//members/0/image01.jpg"; if (file_exists($check_pic)) { $user_pic = "<img src=\"$check_pic\" align=\"left\" width=\"80px\" border=\"0\" />"; // forces picture to be 120px wide and no more } else { $user_pic = "<img src=\"$default_pic\" align=\"left\" width=\"80px\" border=\"0\" />"; // forces default picture to be 120px wide and no more } } $all_responses = ""; $sql = mysql_query("SELECT * FROM forum_posts WHERE otid='$thread_id' AND type='b'"); $numRows = mysql_num_rows($sql); if ($numRows < 1) { $all_responses = '<div id="none_yet_div">No respond has been posted yet.</div>'; } else { while($row = mysql_fetch_array($sql)){ $reply_author = $row["post_author"]; $reply_author_id = $row["post_author_id"]; $date_n_time = $row["date_time"]; $convertedTime = ($myAgoObject -> convert_datetime($date_n_time)); $whenReply = ($myAgoObject -> makeAgo($convertedTime)); $reply_body = $row["post_body"]; $all_responses .= '<div class="response_top_div">Re: ' . $thread_title . ' | ' . $whenReply . ' <a href="../profile.php?id=' . $reply_author_id . '">' . $reply_author . '</a> said:</div> <div class="response_div" style="padding-left:20px; vertical-align:text-top;">' . $user_pic . ' <div style="padding-left:117px;"> ' . $reply_body . '</div></div>'; } } ?> Please help me if you can! Thank you!
  9. I got the proper table in just changed it for linking it up here
  10. ooh.. forgot to say that it's the "ERROR: You do not exist in the system."
  11. Hello! I can't manage to get my forum to work. When I want a new topic to be made I got some code I will show in a second. But I just keep getting my own error message that just shows me something is wrong ... please help me figure it out. [attachment deleted by admin]
×
×
  • 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.