Jump to content

9999

Members
  • Posts

    99
  • Joined

  • Last visited

    Never

Everything posted by 9999

  1. The horizontal scroll bar is gone but the vertical scroll bar stays. :'( My output will never need to scroll as it will alwys fit. I am just using this to set backgound color and vertically align.
  2. Can you set backgound color and vertically align putput of a php script using php alone without divs or tables? For example have the background = black and verticaly center output
  3. Thanks. I want to keep the dimensions as a had them, I just don't want a scroll bar to be added. Sometimes one is added even when not needed.
  4. Given this line, what is the php syntax to set background color to black and prevent a scroll bar from showing? echo'<table style="width:325px; height:160px; padding:0px; border:0px"><tr><td>'; Thanks
  5. Does not do anything. I just want it to move down the page to a differnt section. Another example of this would be if you had one of the "go to top of page" things but you did it from a pull-down.
  6. So the "host" file must be a php file but the included file doesn't have to be?
  7. This is how my pull-down looks: SCRIPT LANGUAGE="JavaScript"> <!-- Begin function formHandler(form){ var URL = document.form.site.options[document.form.site.selectedIndex].value; window.location.href = URL; } // End --> </SCRIPT> <center> <form name="form"> <select name="site" size=1 onChange="javascript:formHandler()"> <option value="">Choose Paragraph <option value="#Paragraph1"> Paragraph 1 </option> <option value="#Paragraph2"> Paragraph 2 </option> <option value="#Paragraph3"> Paragraph 3 </option> </select> </form> </center> Further down on my page here is my anchors. They are of course seperated with text in between them: <a name="Paragraph1">Paragraph 1</a> <a name="Paragraph2">Paragraph 2</a> <a name="Paragraph3">Paragraph 3</a> Someone told me I might need to change this line: window.location.href = URL; with this: window.location = window.location + URL; It stil doesn't work
  8. With the standard php include command: <? include("filename.php") ?> do both the included file as well as the file that the included file goes on have to be php files? If not, how could you do this using html files other than using frames?
  9. So, are you saying just replace this: src="http://somesite.com/blah_blah_blah.gif" with this: src="http://somesite.com/my_file_name.php" is all I would have to do or would some type of image still have to be created and embeded?
  10. I want it to be some like this: http://myotherprofiles.com/dailybibleverse/ This is the code that he uses: <p> <center> <table style='width: 405px;table-layout:fixed; border-top: thin solid; border-right: thin solid; border-bottom: thin solid;border-left: thin solid;background-color:white'> <tr> <td align=center style='background-color:black'> <a target=_blank href=http://www.myotherprofiles.com/dailybibleverse><img border=0 src=http://www.myotherprofiles.com/dailybibleverse/images/dailybibleverseheader.gif></a> </td> </tr> <tr> <td align=center style='border-top: thin solid;'> <a target=_blank href=http://www.myotherprofiles.com/dailybibleverse><img border=0 src=http://www.myotherprofiles.com/dailybibleverse/images/dailybibleverse.gif></a> </td> </tr> <tr> <td align=center style='border-top: thin solid; background-color:black'> <table border=0 bgcolor=000000> <COL WIDTH=200><COL WIDTH=200> <tr> <td style='border-right: thin solid; background-color:black' align=left><a target=_blank href=http://www.myotherprofiles.com/dailybibleverse><img border=0 src=http://www.myotherprofiles.com/dailybibleverse/images/addtoyourmyspace.gif></a></td> <td style='border-left: thin solid; background-color:black' align=right><a target=_blank href=http://groups.myspace.com/dailybibleverse><img border=0 src=http://www.myotherprofiles.com/dailybibleverse/images/joingroup.gif></a></td> </tr> </table> </td> </tr> </table> </center><p> How would I implement the result of my php script http://www.mysite.com/daily_quote.php into all of this to make it update automatically?
  11. If my php script automatically updates daily, is there any way to automatically write to the image? In other words take whatever output the php generates and automatically update the image at the same time the php updates?
  12. Do you mean loading extension to myspace page? If so, how do you do it?
  13. Seems like the include tag might be easier? What do you mean by:
  14. Okay... My next question is how do you create a php image?
  15. Yes, I believe so. What would be the best way of displaying this in about a 100 x 300 table?
  16. Lets say I have a dynamic php page that generates a small "daily quote of the day" box: www.somesite.com/daily_quote.php that I might normally open in an iframe. Since myspace no longer allows iframes, is there a work-around that I could use to put this on a myspace page?
  17. I solved it. Apparently another pulldown next to this one "interfered" with this one, as I removed it and now this works.
  18. I changed to this and still nothing happens when I select from the list. I want it to go to the selection automatically without a "submit"button. <SCRIPT LANGUAGE="JavaScript"> <!-- Begin function formHandler(form){ var URL = document.form.site.options[document.form.site.selectedIndex].value; window.location.href = URL; } // End --> </SCRIPT> <?php echo " <center> <form name='form'> <select name='site' size=1 onChange='javascript:formHandler()'> <option value=''>Select Another Page <option value='http://www.yoursite.com/page2.html'>Page 2</option> <option value='http://www.yoursite.com/page3.html'>Page 3</option> <option value='http://www.yoursite.com/page4.html'>Page 4</option> </select> </form> </center>"; ?>
  19. This pulldown works on my html pages but not on my php pages. I believe an "echo" needs to be added to some of the lines. Could someone give me the proper syntax. Thanks in advance. <SCRIPT LANGUAGE="JavaScript"> <!-- Begin function formHandler(form){ var URL = document.form.site.options[document.form.site.selectedIndex].value; window.location.href = URL; } // End --> </SCRIPT> <center> <form name="form"> <select name="site" size=1 onChange="javascript:formHandler()"> <option value="">Select Another Page <option value="http://www.yoursite.com/page2.html">Page 2</option> <option value="http://www.yoursite.com/page3.html">Page 3</option> <option value="http://www.yoursite.com/page4.html">Page 4</option> </select> </form> </center>
  20. Thanks.  I'm not sure if I follow you correctly.  The "$search" is the user's querry, and I want to check that against the database entires.
  21. This script excepts a user input and searches for it in the $info field of my delimited text file database. If a user enters multiple words it will search for the occurance of each word. My question is what would I change in my script to make it search for exactly what was typed in? I want to allow my users to first search for exactly what they type in and if the are not happy with the number of results returned, I will give them the opportunity to do a "deep search" which is what I already have. [code]<?php $months = array (     'January' => '01',     'February' => '02',     'March' => '03',     'April' => '04',     'May' => '05',     'June' => '06',     'July' => '07',     'August' => '08',     'September' => '09',     'October' => '10',     'November' => '11',     'December' => '12', ); if($_REQUEST['usersearch'] == '1')  // Display Keyword Search Results {     $search = $_GET['search'];     $file = file('data.txt');     $search = preg_replace('/([^a-z0-9\s])/i', '', trim($search) );         if ($_GET['deep'])     {         $keys = preg_split('/[\s,]+/', $search);             if (sizeof($keys) > 5)         {             die("Please enter less keywords.");         }         else if (empty($keys[0]))         {             die("Please enter a valid keyword.");         }             $pattern = '/('. implode('|', $keys) .')/i';     }     else     {         $pattern = '/('. $search .')/';     }         $matches = array();     $matchcount = 0;     foreach (array_values($file) AS $data)     {         list($month, $day, $year, $info) = explode('|', trim($data) );         if (preg_match($pattern, $info))         {             $matches["$year {$months[$month]} $day"][] = preg_replace($pattern, '<span style="color:red;">$1</span>', $info);             $matchcount++;         }     }     if (sizeof($matches) > 0)     {         ksort($matches);         $count = 0;         printf('<center><b><p>%d match%s found.</p></b></center>', $matchcount, $matchcount == 1 ? NULL : 'es');         $months = array_flip($months);                              // flip array toconvert months back to names         foreach ($matches AS $days => $event)         {             foreach ($event AS $result)             {                 list($year, $month, $day ) = explode(' ', $days );                 $month  = $months[$month];                        // convert back to month name                 $count++;                 echo '<b><font face="Times New Roman">' . $count . '--' . $month  . '&nbsp;' . $day . ',&nbsp;' . $year . '--' .'</font></b>';                 echo '<font face="Times New Roman" size="2px">' . $result .'</font>';                 echo "<p>";                 if ($count >= 200)                 {                     break;                 }             }             if ($count >= 200)             {                 break;             }         }         printf('<center><b><p>%d match%s found.</p></b></center>', $matchcount, $matchcount == 1 ? NULL : 'es');     }     else     {         echo '<p><center><b>No results were found for your search--Please try again.</b></center></p>';     } } ?>  <form action="" method="get">   <input type="text" name="search" size="20">   <input type="hidden" name="usersearch" value="1"/>   <input type="checkbox" name="deep" value="1" /> Deep   <input type="submit" value="Search"/> </form>[/code] My focus is on this line:     [code]$pattern = '/('. $search .')/';[/code] I have even changed it to:     [code]$pattern = '/(\s'. $search .')+[\s\,\.]/';[/code]with no luck. What would give me the equivalent of what the "stristr" function would return? For example, a search for "Rick Smith" would find "[color=red]Rick Smith[/color]" "[color=red]Rick Smith[/color]s" or "[color=red]Rick Smith[/color]erman" but not "Ricky Smith" or "Rick A. Smith"
  22. This script excepts a user input and searches for it in the $info field of my delimited text file database.  If a user enters multiple words it will search for the occurance of each word.  My question is what would I change in my script to make it search for exactly what was typed in?  I want to allow my users to first search for exactly what they type in and if the are not happy with the number of results returned, I will give them the opportunity to do a "deep search" which is what I already have. [code]<?php $months = array (     'January' => '01',     'February' => '02',     'March' => '03',     'April' => '04',     'May' => '05',     'June' => '06',     'July' => '07',     'August' => '08',     'September' => '09',     'October' => '10',     'November' => '11',     'December' => '12', ); if($_REQUEST['usersearch'] == '1')  // Display Keyword Search Results { #    $file = file('data.txt');     $search = $_GET['search'];     $file = file('data.txt');     $keys = preg_split('/[\s,]+/', preg_replace('/([^a-z0-9\s])/i', '', trim($search) ) );     if (sizeof($keys) > 5)     {         die("Please enter less keywords.");     }     else if (empty($keys[0]))     {         die("Please enter a valid keyword.");     }     $pattern = '/('. implode('|', $keys) .')/i';     $matches = array();     $matchcount = 0;     foreach (array_values($file) AS $data)     {         list($month, $day, $year, $info) = explode('|', trim($data) );         if (preg_match($pattern, $info))         {             $matches["$year {$months[$month]} $day"][] = preg_replace($pattern, '<span style="color:red;">$1</span>', $info);             $matchcount++;         }     }     if (sizeof($matches) > 0)     {         ksort($matches);         $count = 0;         printf('<center><b><p>%d match%s found.</p></b></center>', $matchcount, $matchcount == 1 ? NULL : 'es');         $months = array_flip($months);                              // flip array toconvert months back to names         foreach ($matches AS $days => $event)         {             foreach ($event AS $result)             {                 list($year, $month, $day ) = explode(' ', $days );                 $month  = $months[$month];                        // convert back to month name                 $count++;                 echo '<b><font face="Times New Roman">' . $count . '--' . $month  . '&nbsp;' . $day . ',&nbsp;' . $year . '--' .'</font></b>';                 echo '<font face="Times New Roman" size="2px">' . $result .'</font>';                 echo "<p>";                 if ($count >= 200)                 {                     break;                 }             }             if ($count >= 200)             {                 break;             }         }         printf('<center><b><p>%d match%s found.</p></b></center>', $matchcount, $matchcount == 1 ? NULL : 'es');     }     else     {         echo '<p><center><b>No results were found for your search--Please try again.</b></center></p>';     } } ?> <form action="" method="get">   <input type="text" name="search" size="20">   <input type="hidden" name="usersearch" value="1"/>   <input type="submit" value="Search"/> </form>[/code]
  23. This script excepts a user input and searches for it in the $info field of my delimited text file database.  If a user enters multiple words it will search for the occurance of each word.  My question is what would I change in my script to make it search for exactly what was typed in?  I want to allow my users to first search for exactly what they type in and if the are not happy with the number of results returned, I will give them the opportunity to do a "deep search" which is what I already have. [code]<?php $months = array (     'January' => '01',     'February' => '02',     'March' => '03',     'April' => '04',     'May' => '05',     'June' => '06',     'July' => '07',     'August' => '08',     'September' => '09',     'October' => '10',     'November' => '11',     'December' => '12', ); if($_REQUEST['usersearch'] == '1')  // Display Keyword Search Results { #    $file = file('data.txt');     $search = $_GET['search'];     $file = file('data.txt');     $keys = preg_split('/[\s,]+/', preg_replace('/([^a-z0-9\s])/i', '', trim($search) ) );     if (sizeof($keys) > 5)     {         die("Please enter less keywords.");     }     else if (empty($keys[0]))     {         die("Please enter a valid keyword.");     }     $pattern = '/('. implode('|', $keys) .')/i';     $matches = array();     $matchcount = 0;     foreach (array_values($file) AS $data)     {         list($month, $day, $year, $info) = explode('|', trim($data) );         if (preg_match($pattern, $info))         {             $matches["$year {$months[$month]} $day"][] = preg_replace($pattern, '<span style="color:red;">$1</span>', $info);             $matchcount++;         }     }     if (sizeof($matches) > 0)     {         ksort($matches);         $count = 0;         printf('<center><b><p>%d match%s found.</p></b></center>', $matchcount, $matchcount == 1 ? NULL : 'es');         $months = array_flip($months);                              // flip array toconvert months back to names         foreach ($matches AS $days => $event)         {             foreach ($event AS $result)             {                 list($year, $month, $day ) = explode(' ', $days );                 $month  = $months[$month];                        // convert back to month name                 $count++;                 echo '<b><font face="Times New Roman">' . $count . '--' . $month  . '&nbsp;' . $day . ',&nbsp;' . $year . '--' .'</font></b>';                 echo '<font face="Times New Roman" size="2px">' . $result .'</font>';                 echo "<p>";                 if ($count >= 200)                 {                     break;                 }             }             if ($count >= 200)             {                 break;             }         }         printf('<center><b><p>%d match%s found.</p></b></center>', $matchcount, $matchcount == 1 ? NULL : 'es');     }     else     {         echo '<p><center><b>No results were found for your search--Please try again.</b></center></p>';     } } ?> <form action="" method="get">   <input type="text" name="search" size="20">   <input type="hidden" name="usersearch" value="1"/>   <input type="submit" value="Search"/> </form>[/code]
  24. Thanks a million.  Seems to work perfectly.
  25. This is a pulldown that automatically selects the current date. Today is August 31 and I noticed that in the pulldown, all the months that don't have 31 days are replaced with the ones that do. Any suggestions? [code]<form action="index.php?" method="GET"> <select name="month"> <?php for ($m = 1; $m <= 12; $m++) {       $date = mktime(0, 0, 0, $m);       echo '<option value="'. date('F', $date) .'"'. ($m == date('n') ? ' selected="selected"' : '') .'>'. date('F', $date) .'</option>'. "\n"; } ?> </select> <select name="day"> <?php for ($d = 1; $d <= 31; $d++) {     echo '<option value="'. $d .'"'. ($d == date('j') ? ' selected="selected"' : '') .'>'. $d .'</option>'. "\n"; } ?> </select> <input type="submit" name="Day Search" value="Day Search"/> </form>[/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.