Jump to content

cnl83

Members
  • Posts

    31
  • Joined

  • Last visited

    Never

Everything posted by cnl83

  1. If you goto http://www.actionfx.net/bfd/photos.php you will see that im trying to show an rss feed from http://picasaweb.google.com/data/feed/base/user/114565750484201639035?alt=rss&kind=album&hl=en_US&access=public My code works well if its just text on the rss but it does not work on this particular rss. I want the photos to show up on my page also. Im hoping someone here can be so kind to help me out with this coding. Below is my code. <?php $feed_url = "http://picasaweb.google.com/data/feed/base/user/114565750484201639035?alt=rss&kind=album&hl=en_US&access=public"; // INITIATE CURL. $curl = curl_init(); // CURL SETTINGS. curl_setopt($curl, CURLOPT_URL,"$feed_url"); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 0); // GRAB THE XML FILE. $xmlTwitter = curl_exec($curl); curl_close($curl); // SET UP XML OBJECT. // Use either one of these, depending on revision of PHP. // Comment-out the line you are not using. //$xml = new SimpleXMLElement($xmlTwitter); $xml = simplexml_load_string($xmlTwitter); // How many items to display $count = 10; // How many characters from each item // 0 (zero) will show them all. $char = 100; foreach ($xml->channel->item as $item) { if($char == 0){ $newstring = $item->description; } else{ $newstring = substr($item->description, 0, $char); } if($count > 0){ //in case they have non-closed italics or bold, etc ... echo"</i></b></u></a>\n"; echo" <div style='font-family:verdana; font-size:.12;'> <b>{$item->title}</b><br /> $newstring ... <span class='redlink' id='redlink' style='redlink'> <a href='{$item->guid}'>read more</a> </span> <br /><br /> </div> "; } $count--; } ?>
  2. Im using dreamweaver, and I have a simple list menu that is linked to a dynamic source in my database. I cannot figure out how to create an action when they select something from the list menu. I suppose that it would have to be passed through the browser somehow. Im not very code fluent, but I try. If you know to accomplish this using dreamweaver cs4 or hard coding, I would appreciate it. I want this: When you click on an item it will bring up all the data pertaining to that particular record. My code: <form id="form1" name="form1" method="post" action=""> <label for="customerlist">Select your customers</label> <p><label for="customers"></label> <select name="customers" id="customers"> <option value="None">None</option> <?php do { ?> <option value="<?php echo $row_Customers['name']?>"><?php echo $row_Customers['name']?></option> <?php } while ($row_Customers = mysql_fetch_assoc($Customers)); $rows = mysql_num_rows($Customers); if($rows > 0) { mysql_data_seek($Customers, 0); $row_Customers = mysql_fetch_assoc($Customers); } ?> </select> <input type="submit" name="Go" id="Go" value="Go" />
  3. I created a tabase with two tables. 1) Customers 2) Software My customers form adds data to the customers table, but on my form I want to assign one or more pieces of software to that particular customer. How do I link up the tables to work that way? My customers table has a unique id. Im using dreamweaver and php my admin Thanks in advance
  4. I still dont have this figured out.. Any more help?
  5. The data is saved into a text file. I guess it would be easier to load it directly from the text file, right?
  6. I hate to sound mentally challenged, but what do I do with that code?
  7. Yes, that is the code that displays the news, but the code you posted did not work. It actually cut the rest of the page off.
  8. I have a some news that im loading into a cell. You can see the actual page here. (take a look at the section towards the bottom that says CHADS TEST). http://www.poshinteriors.com/09/news/ I only want to be able to display no more than 250 Characters. Does anyone know a nifty way to do this in a cell? <td height="110"></td> <td colspan="2" rowspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="imported/news.gif"> <!--DWLayoutTable--> <tr> <td width="32" height="38"> </td> <td width="258"> </td> <td width="11"> </td> </tr> <tr> <td height="89"> </td> <td valign="top"><p align="left"><?php include_once( dirname(__FILE__) . '/fastnews-code.php' ); $fn = new fastNews(); echo $fn->display(); ?></a> </p></td> <td> </td> </tr> </table></td>
  9. I have downloaded and installed 6 different guestbooks, but everyone of them wont show the security code you have to enter to prevent spam. What could the problem be? There is just an X where the image goes. http://www.menardinfosystems.com/guestbook/
  10. I have downloaded and installed 6 different guestbooks, but everyone of them wont show the security code you have to enter to prevent spam. What could the problem be? There is just an X where the image goes. http://www.menardinfosystems.com/guestbook/
  11. Sorry if I sound naive, but its because im not really a pro at php. You are saying I need to add $_SERVER[REMOTE_ADDR] like this? if ($_SERVER[REMOTE_ADDR]) $ip = "no ip"; else $ip = getHostByAddr($REMOTE_ADDR);
  12. Here is the php info on the server im using http://www.allsaidaudiosolutions.com/test.php The problem I have is that my form doesnt work. I cant figure out why it would not. It works on every other server ive used it on. PHP <? // Enter your contact email address here $adminaddress = "myaddy"; // Enter the address of your website here include http://www. $siteaddress ="myaddy"; // Enter your company name or site name here $sitename = "All said audio solutions"; /******************************************************* No need to change anything below ... *******************************************************/ // Gets the date and time from your server $date = date("m/d/Y H:i:s"); // Gets the IP Address if ($REMOTE_ADDR == "") $ip = "no ip"; else $ip = getHostByAddr($REMOTE_ADDR); //Process the form data! // and send the information collected in the Flash form to Your nominated email address if ($action != ""): mail("$adminaddress","Web email form", "A visitor at $sitename has left the following information\n Name: $fname Organization: $organization Department: $department Email: $email Telephone: $telno\n City & State: $city Budget: $state Project and Budget: ------------------------------ $comments Logged Info : ------------------------------ Using: $HTTP_USER_AGENT Hostname: $ip IP address: $REMOTE_ADDR Date/Time: $date","FROM:$adminaddress"); //This sends a confirmation to your visitor mail("$email","Thank You for visiting $sitename", "Hi $fname,\n Thank you for your interest in $sitename! $siteaddress","FROM:$adminaddress"); //Confirmation is sent back to the Flash form that the process is complete $sendresult = "Thank you for visiting <a href = \"$siteaddress\" target = \"_blank\"><u>$sitename</u></a>. You will receive a confirmation email shortly. "; $send_answer = "answer="; $send_answer .= rawurlencode($sendresult); echo "$send_answer"; endif; ?>
  13. I uploaded this small app to my server, and it works fine. I uploaded to my customers server, and it does not work. Im not sure what to ask the host to turn on or off. Maybe someone here has had this problem. Here is the error Warning: copy(/home/content/k/e/v/kevinandjeff/html/allsaidaudiosolutions/uploads/uploads/): failed to open stream: Is a directory in /home/content/k/e/v/kevinandjeff/html/allsaidaudiosolutions/uploads/upload.php on line 18 Here is PHP <?php $path = dirname($_SERVER['SCRIPT_FILENAME']) . "/uploads"; //If we are sending a file. if(isset($_FILES['file']) == true) { //Change scope of file var. $file = $_FILES['file']; //Down below after the code $path is where you add //to the name of the image such as imagespotlight if(copy($_FILES['file']['tmp_name'], $path . "/" . $file_name) == true) { //Create a linker thing! Also is where the link is actually put out. //In order to give correct link you have to be in concert with the above statement like //spotlight --> then the actual jpg, but you have to add spotlight so the link can be correct. $file_url = "http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/uploads/" . $file_name; //Create a good message! $message = "<font color=\"green\">Your {$kbsize}KB file named <i>$file_name</i> was uploaded successfully.</font><br>\n" . "<b>File <a href=\"" . $file_url . "\">Link:</a></b><br>\n" . "<textarea readonly cols=\"50\" rows=\"1\">" . $file_url . "</textarea>\n"; //If the copy fails. } else { //Create error message! $message = "<font color=\"#990000\">Error - Your file named <i>$file_name</i> was not uploaded successfully.</font>"; } //Unlink the temp file. unlink($_FILES['file']['tmp_name']); } //Output message. echo $message; ?>
  14. Dont know why...but this worked. Dont know why mine did not work. if ($page_protect->access_level >= RESTRICTED_ACCESSPROGRAM_LEVEL) { //echo $page_protect->access_level; echo "<script language=\"javascript\" type=\"text/javascript\">"; echo "window.location=\"authenticatedaccessthree.php\";"; echo "</script>"; }
  15. That will deffintely redirect, but I need it to rediret if ($page_protect->access_level >= RESTRICTED_ACCESSPROGRAM_LEVEL)
  16. Nah that did not work. Its got to be with my page protect. The page protect works, but not in an if statement obviously.
  17. Ok, the page protect function is my class file, but im not sure I have the redirect code right. [code] require ('/home/apex/scormsource-www/'."/classes/access_user/access_user_class.php"); session_start(); $sid = $_SESSION['name']; $page_protect = new Access_user; $page_protect->access_page(); // only set this this method to protect your page if (isset($_GET['action']) && $_GET['action'] == "log_out") { $page_protect->log_out(); // the method to log off } //THIS IS WHERE IM HAVING PROBLEMS. IT DOES NOT SEEM TO WORK. if ($page_protect->access_level >= RESTRICTED_ACCESSPROGRAM_LEVEL) { header("location: authenticatedaccessthree.php"); } //END [/code]
  18. What is the deal with not being able to put a lower value into a database? If a value of 2 is set and I submit a form that changes it to 1 it doesnt change..you can only go up with the number...
  19. Im having issues passing my variables via url. Here is my code in the main php file.. [code] session_start(); $sid = $_SESSION['name']; ?> later on in the page <a href="https://dataencrypted.com/scormsource/classes/access_user/read.php?<?=$sid?> [/code] and that works cause when you click the link it renders my name like this [a href=\"https://dataencrypted.com/scormsource/classes/access_user/read.php?Chad%20Landry\" target=\"_blank\"]https://dataencrypted.com/scormsource/class...p?Chad%20Landry[/a] My code in read.php is [code] session_start(); $val = $_GET['sid']; print "HI: $val"; ?> [/code] I cannot get it to print $val Thanks in advnaced[code][code]
  20. Can anyone tell me how to pass variables from HTTPS to HTTP... Im using this: from: [a href=\"https://dataencrypted.com/scormsource/classes/access_user/authenticated.php\" target=\"_blank\"]https://dataencrypted.com/scormsource/class...thenticated.php[/a] to: [a href=\"http://www.scormsource.com/classes/access_user/read.php?PHPSESSID=<?=$PHPSESSID?>\" target=\"_blank\"]http://www.scormsource.com/classes/access_...;PHPSESSID?>[/a] Im getting this error Warning: session_start(): The session id contains invalid characters, valid characters are only a-z, A-Z and 0-9 in /home/apex/scormsource-www/classes/access_user/access_user_class.php on line 24 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/apex/scormsource-www/classes/access_user/access_user_class.php:24) in /home/apex/scormsource-www/classes/access_user/access_user_class.php on line 24 &real_name=&levelFive=0 Warning: Unknown(): The session id contains invalid characters, valid characters are only a-z, A-Z and 0-9 in Unknown on line 0 Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0
  21. [!--quoteo(post=355124:date=Mar 14 2006, 11:27 PM:name=keeB)--][div class=\'quotetop\']QUOTE(keeB @ Mar 14 2006, 11:27 PM) [snapback]355124[/snapback][/div][div class=\'quotemain\'][!--quotec--] change [code]$query = "SELECT * FROM users";[/code] to [code]$query = "SELECT * FROM users WHERE login = '<userlogin>' ";[/code] [/quote] Ok thanks...where are you getting <userlogin>?
  22. [!--quoteo(post=355111:date=Mar 14 2006, 10:59 PM:name=hitman6003)--][div class=\'quotetop\']QUOTE(hitman6003 @ Mar 14 2006, 10:59 PM) [snapback]355111[/snapback][/div][div class=\'quotemain\'][!--quotec--] Change: [code]$real_name = mysql_result($result,0,"real_name"); //$one = mysql_result($result,0,"one"); print "&real_name=$real_name"; //print "&one=$one";[/code] to: [code]for ($i = 0; $i < mysql_num_rows($result); $i++) {   print "&real_name=" . mysql_result($result,$i,"real_name"); }[/code] You may have to add in a "\n" or something along those lines for flash to intrepret each one seperatly. [/quote] Thank you for your reply... Im not trying to read all the records at one time though. Im trying to read the record for the current user.
  23. This script is for Flash, but it works cause I tested it out. All im doing is pulling the record for the current user. Basically, just the name for now. The problem I have is that, it is pulling the first record int he DB. Im still a noob, and if someone could help with this code, that would be awesome. [code] <? include ('Include.inc'); require ('/home/apex/scormsource-www/'."/classes/access_user/access_user_class.php"); $page_protect = new Access_user; // $page_protect->login_page = "login.php"; // change this only if your login is on another page $page_protect->access_page(); // only set this this method to protect your page if (isset($_GET['action']) && $_GET['action'] == "log_out") {     $page_protect->log_out(); // the method to log off } //stuff for FLASH mysql_connect($DBhost,$DBuser,$DBpass); @mysql_select_db("$DBName"); $mid=$mid-1; $query = "SELECT * FROM users"; $result = mysql_query($query); $real_name = mysql_result($result,0,"real_name"); //$one = mysql_result($result,0,"one"); print "&real_name=$real_name"; //print "&one=$one"; print "&status=DONE."; ?>[/code]
  24. [!--quoteo(post=355001:date=Mar 14 2006, 07:02 PM:name=wickning1)--][div class=\'quotetop\']QUOTE(wickning1 @ Mar 14 2006, 07:02 PM) [snapback]355001[/snapback][/div][div class=\'quotemain\'][!--quotec--] if($error==""){ No closing bracket on that. File you gave us has 50 lines, so it's tough to track down a bug on line 61. [/quote] Thanks! ti worked great!
×
×
  • 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.