
fizzzgigg
Members-
Posts
35 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
fizzzgigg's Achievements

Member (2/5)
0
Reputation
-
OMG! 8) Thank you. I have been working on this all day and I feel like such a noob! Thank you guys for your help. I have it working now. On to the next thing...
-
QuickOldCar: I put echo all throughout the script and I constantly received errors? Besides isn't the script being echoed in the very end? $excess = '<div class="titlerex">Past Assignments</div><div class="contentmex">'.$display.'</div>'; echo getlyt($title, $linktent, $excess); It needs to be in the $excess area due to the div placement. thorpe: $loggedin is stored in functions.php
-
I added some more information to the database to increase the results I am still only getting the first result to display. I don't know why it works by itself, but doesn't when I intergrate it into the site. Anyone have some ideas? Adam
-
UPDATE: I have it fixed but not completely. There should be two rows populated but I am getting one. <?PHP include('functions.php'); $query = "SELECT DISTINCT name,pid FROM homework WHERE uid='$loggedin' ORDER BY id ASC"; $result = mysql_query($query); while ($myrow = mysql_fetch_array($result)) { $display = "<a href=myphotos.php?pid=".$myrow['pid'].">".$myrow['name']."<br>"; } $title = 'Light Graspers Certification'; $linktent = '<div class="titler">Your Pictures</div><div class="contentm">'.$data[index].'</div>'; $excess = '<div class="titlerex">Past Assignments</div><div class="contentmex">'.$display.'</div>'; echo getlyt($title, $linktent, $excess); But it works just fine in test.php file by itself... as in I get the correct results. Any guesses? <?PHP include('functions.php'); $query = "SELECT DISTINCT name,pid FROM homework WHERE uid='$loggedin' ORDER BY id ASC"; $result = mysql_query($query); while ($myrow = mysql_fetch_array($result)) { echo "<a href=myphotos.php?pid=".$myrow['pid'].">".$myrow['name']."<br> "; } ?>
-
I tried doing functions and all that... I am just can't seem to figure it out. If someone could help me or point me in the right direction, that would be awesome! I need this following script: <?PHP include('functions.php'); $query = "SELECT DISTINCT name FROM homework WHERE uid='$loggedin' ORDER BY id ASC"; $result = mysql_query($query); while ($myrow = mysql_fetch_array($result)) { echo $myrow['name']."<br> "; } ?> That script needs to be executed in the sidepanel where the word "hello" is in this script: <?PHP include('functions.php'); $linktent = '<div class="titler">Your Pictures</div><div class="contentm">'.$data[index].'</div>'; $excess = '<div class="titlerex">Past Assignments</div><div class="contentmex">'."hello".'</div>'; echo getlyt($title, $linktent, $excess); Any help would be greatly appreciated. Adam
-
Seriously now my db is gone! F@#$#@$ bull#@##
-
Fixed it thank you so much!!!!
-
Why doesn't this code work? I can't figure it out. Database information: DB: abelltx table: homework Fields in table: id, pid, uid, name, url, approved, comment, SubmissionTime <?PHP $link = mysql_connect('xxxxxx', 'xxxxx', 'xxxxxxx') or die(mysql_error()); mysql_select_db("abelltx", $link) or die(mysql_error()); $uid=abelltx $query = "SELECT DISTINCT name FROM homework ORDER BY id ASC"; $result = query_db($query); while ($myrow = mysql_fetch_array($result)) { echo $myrow[name].", "; } ?> I get the following error: "Parse error: syntax error, unexpected T_VARIABLE in D:\Hosting\5366560\html\test.php on line 6"
-
Oh sorry I thought I included that. Globalfunction is beneath this as well... function getphoto($title, $content, $excess = null, $excess2= "") { $data = globaldata(); $excess = ($excess==null)?$data[sidebar]:$excess; global $loggedin; $admin = isadmin($_COOKIE[sid])?'<a href="admin.php">Admin Link</a><br />':''; $admin2 = isadmin($_COOKIE[sid])?' id="bodi" '.$excess2:''; $teacher = isteacher($_COOKIE[sid])?'<a href="teacher.php">Teacher Link</a><br />':''; $teacher2 = isteacher($_COOKIE[sid])?' id="bodi" '.$excess2:''; $welcome = ($loggedin == false)? 'Welcome, Guest, why not <a href="register.php">Register</a>?':'Welcome Back, '.$loggedin.'!'; $exlinks = ($loggedin == false)? '<a class="nav" href="login.php">Login</a>'. '<a class="nav" href="register.php">Register</a>':''. '<a class="nav" href="portal.php">Purchased</a>'. '<a class="nav" href="profile.php">Your Profile</a>'. '<a class="nav" href="login.php?logout=true">Logout</a>'; return '<!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"> <head> <title>'.$title.' - '.$data[name].'</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta name="description" content="'.$data[description].'" /> <meta name="keywords" content="'.$data[keywords].'" /> <script src="scripts.js"></script> <link href="style.css" rel="stylesheet" type="text/css" /> <link href="'.$data[favicon].'" rel="shortcut icon" type="image/x-icon" /> <link href="js/lytebox.css" rel="stylesheet" type="text/css" /> <script src="js/lytebox.js" type="text/javascript"></script> </head> <body'.$admin2.'> <body'.$teacher2.'> <div class="main"> <div class="toplinks"> <a class="toplinks" href="index.php">About Us</a> <a class="toplinks" href="faq.php">FAQ</a> <a class="toplinks" href="contact.php">Contact Us</a> <a class="toplinks" href="login.php">Login</a> <a class="toplinks" href="register.php">Register</a> </div> <div class="logo"> <!--<a href="index.php" class="logo" alt="'.$data[name].'"><span>'.$data[name].'</span></a>--> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="885" height="94" id="Untitled-1" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="allowFullScreen" value="false" /> <param name="movie" value="swf/theme.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /> <embed src="swf/theme.swf" quality="high" bgcolor="#ffffff" width="885" height="94" name="Untitled-1" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" /> </object> </div> <div class="links"> <a class="nav" href="index.php">Home</a> <a class="nav" href="myphotos.php">My Photos</a> <a class="nav" href="search.php">Tutorials</a> '.$exlinks.' </div> <div class="content"> <div class="welcome"> '.$welcome.' </div> <div class="mainc"> '.$content.' </div><div class="addc"> '.$excess.' </div> </div> <div class="copyright"> '.$admin.' '.$teacher.' '.$data[copyright].' </div> </div><!-- <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src=\'" + gaJsHost + "google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E")); </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA-8937404-2"); pageTracker._trackPageview(); } catch(err) {} </script>--> </body> </html>'; } here is is global function: function globaldata() { $query = mysql_query("SELECT * FROM `global`"); while($row = mysql_fetch_assoc($query)) { $data[$row[name]] = base64_decode($row[data]); } return $data; }
-
The word Testimonials will be changed to "Past Assignments"
-
I am getting a little frustrated, and I need some help. I've working on this all day (I am new... otherwise I'd fly through it). This is a simple problem I just can't seem to put a ' in the right spot or something... Here's the gist. In file myphotos.php is the following: <?PHP include('functions.php'); $link $title = 'Light Graspers Certification'; $linktent = '<div class="titler">Photo Review</div><div class="contentm">'.$data[index].'</div>'; $excess = '<div class="titlerex">Testimonials</div><div class="contentmex">'.$displayoptions.'</div>'; echo getphoto($title, $linktent, $excess); ?> Now my goal is under $displayoptions the following will happen. SELECT DISTINCT name FROM homework WHERE uid='$loggedin' ORDER BY id"; With proper code I should see a distinct list of all the "name" rows. The user clicks on it to be directed to just those rows... etc... Here is was some old code I tried manipulating to get the same result... but I couldn't seem to get it to work. Of course I only need one column in my new code. Any help would be a appreciated. Adam $columns = 5; //change the query to get another field from the database $query = "SELECT DISTINCT city,state FROM church WHERE state='$state' ORDER BY city"; $result = mysql_query($query); $num_rows = mysql_num_rows($result); $rows = ceil($num_rows / $columns); while($row = mysql_fetch_array($result)) { $data[] = $row['city']; //store the other field into an array } for($i = 0; $i < $rows; $i++) { { echo "<tr valign=bottom>"; echo "<td bgcolor=#2172A1 colspan=10><img src=img/blank.gif width=1 height=1></td>"; echo "</tr>"; } echo "<TR valign=center>"; for($j = 0; $j < $columns; $j++) { if(isset($data[$i + ($j * $rows)])) { echo "<td class=tabval><b><a href='findnew.php?state=".$state."&city=" . $data[$i + ($j * $rows)] . "'>" . $data[$i + ($j * $rows)] . "</a></b></td>"; } } echo "</TR>"; } echo "<tr valign=bottom>"; echo "<td bgcolor=#2172A1 colspan=10><img src=img/blank.gif width=1 height=8></td>"; echo "</tr>"; echo "$state represents $num_rows3 \n of our $num_rows2 churches\n that we serve. "; }
-
I like the unique ID idea. I wasn't too concerned with people peeping on other images... but this simple manuever will eliminate. To answer your question... the images are stored in folders, and the database links their names and locations, but I can easily pull the unique id from that table.
-
Yes its arranged by: /file_upload/uploads/user/assignment/ I only want users to see their own files, and my comments on their photos. I havn't thought about thumbnails, but they would be useful for sure. Down the road I want to have the imags resized to safe space, I only need 72ppi on their photos at a 4x6 view, but first I wanted to start working on a gallery. Your thoughts? Adam
-
I am working on a site of my own, and I have run into a jam. The situation: A user logs in reads their assignment, and then goes out and takes pictures. Once they upload their pictures I will comment on them, and they can see the pictures and my comments. The problem: I currently have a successful system of uploading the pictures and I have the URL's stored a mysql database. My problem is finding a good photo gallery to customize for my needs. I only have 5-15 photos per folder. And I want the gallery only to show the photos in that one folder and read my comments. Any directions for me to start looking?
-
Well I fixed it. This now feels like a journal...