One Title And Several Sample Images For Each Subcategory On A List
I have a site with lots of images organized in categories and subcategories. Whenever a category is chosen (say, "Pets"), I want to display the list of all available subcategories so that each subcategory has a title and 3 sample images, like that: Code:
View Complete Forum Thread with Replies
Related Forum Messages:
Dropdown List Which Selects A Post A Title (to Edit)
I want to have a dropdown list which selects a post a title (to edit), then when you click submit I want to use POST to submit the data for that post (post title, username, subject, content) so that the edit pages form fields will already be filled with the posts data.
View Replies !
Category/Subcategory
I have a table with computer courses in it. It already has a field that associates the course with a specific vendor. Now, it is desired to give the courses categories and subcategories, to basically drill down via a webpage to get to a filtered list of courses. 1. What is the best method for storing this information, keeping in mind that a given course could be associated with several subcats or even several main categories. (I read some stuff about recursive functions, but I'm not sure if that's what should be used here.) 2. What is the best way to make the association of these courses with the new categories. Meaning, if the association is done by a user via a webpage, what's a good method to create the associations? i was thinking you'd bring up each course and then have a dropdown with selections, but i'm not sure how you'd select multiple cats or subcats and then store it. and store it how?? one table? more than one table?
View Replies !
Counting Entries For Main Category, And Subcategory
What Im wanting is for the main category to give the total of items, but also ad the total of items in each of its subcategories... thats it, I know its something simple, and I had posted this at codewalkers.com and it upset me because no matter what. it used to be they would at least try to help, but now, its been about 2 weeks on their site, and not one reply... so,, I came to a site that I thought was another one of the best for knowledge.. Code:
View Replies !
$title Not Displaying In <title>$title</title>
For some reason $title will not display in the <title></title> using print or echo. I've tried modifying the if staments to ifelse, and even fiddled with $_GET to get this working. Tried dbl/single quotes, even changed the variable around thinking $title might be a global. nothing working yet. Any ideas? <?php $page == 'home' $title == "Welcome!"; if ($page == 'home') { $title == "Welcome!"; } elseif ($page == 'about') { $title == "about us"; } elseif ($page == 'products') { $title == "Products"; } elseif ($page == 'services') { $title == "Services"; } elseif ($page == 'repair') { $title == "Upgrades & Repairs"; } elseif ($page == 'network') { $title == "Network Solutions"; } ?> <html> <head> <meta http-equiv="Content-Language" content="en-us"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>My Site - <?php print "$title";?></title> </head> <body bgcolor="#FFE0C1"> ...
View Replies !
How To Output A List Of Images With Php?
I need to do the following and I don't know where to start. I have a folder with a lot of gif files. How can I make a php code that reads the file names so I can link them and show them on a web page without doing all the code by hand... ?
View Replies !
How Can I Get A List Of Images In A Directory?
I'd like to have a form, and in it a pull-down menu which is populated by PHP. There's a bunch of JPG files in a certain directory that I'd like to populate the pull-down with. I just want it to display the filename. Even with the .jpg would be fine, so that when someone makes a selection, it passes the whole filename to the form.
View Replies !
Display Article's Title In Title Tag
I want to show the article's title in the title tag. But I can't display the title from the article because the title tag is loaded first and the the rest of my page. I have a solution with javascript but if you haven't enable javascript, you'll see nothing so I want to do this with PHP, but how. Code:
View Replies !
I Need Information From To ......
I have to retrive the title tag information? can you tell me. i am new to the php ........ can you give the example to get the information between <title> to </title> from the web page...... how shall i get it.
View Replies !
Convert ##TITLE## To $title
Im half way through making an article manager for a new site im launching. If i type ##TITLE## into a text box, when i display the artcile, how do i turn the placeholder ##TITLE## into $title of the article. i looked at str_replace but i dont think thats what i need... i need something that searched through the text of a var and if it finds anything within ##*## to convert the * into the $var.
View Replies !
E-cards Sample
I'm looking for the e-card scripts where the recipient can view their card straight away in their inbox. Most of the e-cards scripts available only send a link into the mailbox and recipient have to visit the link to view their cards.
View Replies !
Sample Postback?
could anyone suggest sample postback script? (have searched the forum) Would like to validate data. Also -- if I connect with a seperate username/password file, do I really need: mysql_real_escape_string() For username and password within that file for security? <?php require_once('../connect.php'); ?> Or is it better to create the connection directly, after the data has been validated? Also, my merchant Gateway just informed me they can only postback as $_GET
View Replies !
Sample Program
I was wondering if someone could help me with a sample program. It needs to take user names they input with a BufferedReader put it in an array. do a loop until the user enters a null value and then display it. I know this is probably simple but I am learning this for the first time.
View Replies !
Parsing Sample Xml File.
I have some problems with parsing this sample xml file. <section id="L11"> <group id="L21"> <field key="name1" value="1"/> <field key="name2" value="2"/> <field key="name3" value="3"/> <field key="name4" value="4"/> <field key="name5" value="5"/> <field key="name6" value="6"/> </group> <group id="L22"> <field key="name7" value="7"/> <field key="name8" value="8"/> <field key="nam9" value="9"/> </group> </section> <section id="L12"> <group id="L23"> <field key="name10" value="10"/> <field key="name11" value="11"/> </group> <group id="L24"> <field key="name12" value="12"/> <field key="name13" value="13"/> <field key="nam14" value="14"/> </group> </section> PHP Code:
View Replies !
Sample Databases For Practicing
I'm currently teaching a course in web programming where we're using PHP to connect to MySQL. A book we're using has a sample database in it for use in practicing, but the database is not well populated with data. This works fine for some applications, but I'd really like the students to experience working with a variety of database structures and a larger volume of table data. Can anyone suggest a source for "sample databases"? The format isn't critical, since I can probably find a filter to help me get it into MySQL. My searches thus far on the web haven't been very productive.
View Replies !
Statistics Code Sample
I want to implement a statistic with the data that I am collectying on my MSQL database. through a sample code to write a simple bar or pie chart php statistics.
View Replies !
Geting Rgb From Color Sample
i want to get color RGB from color sample, i wrote this: <?php //color sample file $im = imagecreatefrompng("a.png"); $rgb = ImageColorAt($im, 1, 1); $r = ($rgb >> 16) & 0xFF; $g = ($rgb >> 8) & 0xFF; $b = $rgb & 0xFF; echo"R:$r G:$g B:$b"; ?> Outputs "R:0 G:0 B:0" but should be "R:128 G:58 B:100"? What is wrong?
View Replies !
Need Sample Code For Unpack XML Response
I am developing USPS shipping API for my site. All the work is going on testing phase. My site uses PHP/MySQL. Now I am working on USPS tracking/confirm. I can send request and get responses from USPS. I need sample code for unpack XML response for USPS tracking. Sample code should be in PHP language. If it is not available in PHP, other language like PERL, JAVA etc is acceptable.
View Replies !
Random Sample From MySQL Database
I am trying to fetch 5 records, randomly picked and in random order from a MySQL table (MySQL version > 3.23). I wrote my SQL Query as SELECT name,id FROM tablename WHERE active = 'Y' ORDER BY RAND() LIMIT 5 But its not working. It returns records in a fixed order every time. Can anybody suggest why its not working the expected way? I found an alternative solution and used the following query SELECT name,id FROM tablename WHERE active = 'Y' ORDER BY MD5(RAND()) LIMIT 5 Its working fine :-) But still i am not clear why the first query is failing? :-(
View Replies !
Newbie ?: Need Sample Form Processing Scripts
I'm on a very short deadline and I need only to process an HTML form with a few data fields. I need to do three things, all three triggered by form submission: 1. capture the form field names and their matching values, 2. Write that data to an email and send the email to one or more addresses as a single message with multiple recipients. 3. Write the same data into a comma AND quote delimited text file. Save the file in a named server sub-folder. If the file exists, append each subsequent form submission. If not, create the file and write the first record. Perhaps I've missed such scripts in my own searches on the web and on php.net. Can anyone point me to some web sources for examples of such PHP scripts just to get the ball rolling?
View Replies !
Sample Code Reediting PHP Option Names
Does any one have a sample code for reediting option names in PHP. i.e To have the a specific option name Bracelet Size be replaced with Bracelet Size: Guidelines. Guidelines will be a popup describing How to measure you wrist size. Here is the PHP code in my tpl_document_product_info_display.php ?> <tr> <td class="main" align="left" valign="top"><?php echo $options_name[$i] . ':' ?></td> <td class="main" align="left" valign="top" width="75%"><?php echo $options_menu[$i]; ?></td> </tr> <?php if ($options_comment[$i] != '' and $options_comment_position[$i] == Ƈ') { ?> <tr> <td colspan="2" class="ProductInfoComments" align="left" valign="top"><?php echo $options_comment[$i]; ?></td> </tr> <?php } ?>
View Replies !
Sample Month At A Time Code For Events Calendar
I am in the process of rewriting one of my first PHP scripts, an event calendar, and wanted to share the code that is the core of the new calendar. My current/previous calendar processed data dates only, this code is intended to use more thrifty event descriptions (3rd saturday, last tuesday, etc.) as well as traditional one-of dates. The core here here is quite spartan, no table logic or or db cruft included <?php //sample code to generate american calendar format for a given month // i,e. start of sunday on or before the 1st end on te saturday on or after the last day. // makes use of mktime's cool liberal calculation of dates. // Set sample month and year values: $mn = date("m"); $yr = date("Y"); // Start calendar logic: $firstday = date("w",mktime(0,0,0,$mn,1,$yr));// Get first day of target month (0=sum 6=set) $numdays = date("t",mktime(0,0,0,$mn,1,$yr));// Number of days in target month $daystop = $numdays+(6-date("w",mktime(0,0,0,$mn+1,0,$yr)));// Adjusted last saturday of calendar page (on or after last day of month //start with american first sunday on or before start of month of calendar page and end on daystop (saturday) for($daynum = 1 - $firstday; $daynum <= $daystop; $daynum++) { //need working date timestamp to work out details of the calendar $wkdate = mktime(0,0,0,$mn,$daynum,$yr);//the first of the month - unix value $wdy = date("w",$wkdate);//day of the week (0 sun - 6 sat) $wmn = date("m",$wkdate);//month $wdt = date("d",$wkdate);//date $wdte = date("D, m/d/Y",$wkdate);//date string of current date "Day, mm/dd/yyyy"
View Replies !
List Contents Of A Folder, Make List Of Links
Does anyone know how I can write a script that: - reads in all the files in a particular directory - displays the file names in a html list and makes a link of them: <ul> <li><a href="filelocation1">filename 1</li> <li><a href="filelocation2">filename 1</li> <li><a href="filelocation3">filename 1</li> </ul> etc.? So basically it creates a list of links with the contents in that directory, so you can download them from there.
View Replies !
Get List Of Messages From One Table, Message List Indicator From
I have two tables. One has a list of messages left by users using fields named mbxno for the mailbox and msgno for the message number. I have another table that has mailbox settings for each user that contains a field named "messagelist" to indicate if they want to be included on the message list or not. What I'm trying to create is a list of the most-recent messages with a lookup on the users table to indicate whether a message in the list should be included in the message list based on the user's mailbox settings. SELECT messages.msgno, messages.mbxno, users.messagelist FROM messages, users WHERE (users.messagelist = Ƈ') ORDER BY msgno DESC LIMIT 100 What I'm getting, though is a list that looks like this: mbxno: 1114 msgno: 0412141623 msglist: 1 mbxno: 1114 msgno: 0412141623 msglist: 1 mbxno: 1114 msgno: 0412141623 msglist: 1 mbxno: 1114 msgno: 0412141623 msglist: 1 mbxno: 1114 msgno: 0412141623 msglist: 1 mbxno: 1114 msgno: 0412141623 msglist: 1 mbxno: 1114 msgno: 0412141623 msglist: 1 mbxno: 1114 msgno: 0412141623 msglist: 1 I think what's happening is that I'm using the wrong type of join and more rows are being created than necessary. If I add "DISTINCT" to the query, I get a list of the most-recent messages as I expect, but the "messsagelist" value is sometimes wrong (again, probably because the data is getting jumbled). For example, the messagelist value for the second row (2214) should be 0, not 1. mbxno: 1114 msgno: 0412141623 msglist: 1 mbxno: 2214 msgno: 0412141622 msglist: 1 mbxno: 2189 msgno: 0412141408 msglist: 1 mbxno: 0000 msgno: 0412141213 msglist: 1 mbxno: 0003 msgno: 0412141213 msglist: 1 mbxno: 2265 msgno: 0412132029 msglist: 1 mbxno: 0000 msgno: 0412131950 msglist: 1 How should I be doing this? If nothing else, what kind of join will work with a long list compared to a value from a short list?
View Replies !
Get Title?
How do you get the title of a(n) external webpage? Ive seen it done on the vBulletin's software. Anyone know how to exactly do this? Or is there a PHP function already added to the PHP software that I don't know about.
View Replies !
<title>
im trying to put the title of the page to my file and i keep getting headers sent messages ... i tried ob_start(); and it still wont work how would i go about putting <title>my title ... </title> to my file below? Code:
View Replies !
Title
Why doesn't the contents of the "title" field get displayed on the screen? <?php $con = mysql_connect("localhost","ODBC",""); if (!$con) { die(mysql_error()); } mysql_select_db("MP3", $con); $result = mysql_query("SELECT * FROM books"); echo $result['title']; mysql_close($con); ?>
View Replies !
Title,URL
I have the following example that will extract the TITLE from a web page successfully but how can I extract the TITLE from a "redirected" link. <?php $file = fopen ("http://www.example.com/", "r"); if (!$file) { echo "<p>Unable to open remote file. "; exit; } while (!feof ($file)) { $line = fgets ($file, 1024); /* This only works if the title and its tags are on one line */ if (eregi ("<title>(.*)</title>", $line, $out)) { $title = $out[1]; echo "$title"; break; } }fclose($file); ?>
View Replies !
Stamps/inserts Small Images (logos) Onto Larger Images.
It may be called image stamping or water marking but im not sure. Basically i want a script that prints/stamps a smaller image onto a larger one, the smaller mage being a logo. This will make it harder for people to steal my pictures as they will have my logo on them. An example of this is with ebay, when you submit a picture of the item your selling ebay will printe a small logo in the bottom right corner of the picture. Could anyone suggest a script for this, just a simple one then i can mess around with it and make it better.
View Replies !
How Can I Show A Title?
The script below is from a popup window that I have that displays projects, what I would like, is that the title of the window have the project title in it, Code:
View Replies !
Dates In Title?>
Would it go something like this <title>Title <?php date('Y') ;?> </title> to get the year in the title or isnt it possible?
View Replies !
Page Title
I have another post on here for this problem but I think I have overcomplicated the matter.. Ok in it's simplest form: Is there a way to retrieve the current page title and place it into a PHP variable? something like" $pagetitle = **** Title of the current page I'm viewing ****
View Replies !
Title Case
I haven't found a way to set title case in PHP... IE: test tItle => Test Title Is there a way to achieve this?
View Replies !
Match Title
I am trying to get a the title out of a html page, I have the html code loaded into a variable. The only thing is sometimes the title is not on the same line. <title>need this text</title> $title = preg_match(/<title>s</title>/i, $html); help me with this match syntax?
View Replies !
Title Of Page
On an arbitrary web page, I would like the code to return the web path to that page and including the title of that page. The purpose is to provide folks who might want to link to the page the actual code they need to make the link by cutting and pasting the code into their own site. Something like this: Code: <a href="http://www.phpbuilder.com/example.php">Page Title</a>
View Replies !
Title Tag In Mozilla
$varible is "3 lines text........................... ...................... ........................"; I have used echo "<img src="../images.gif" tilte="$variable"></img>"; But on tooltip all the 3 lines is shown in a single line with mozilla browser. In IE it is shown in separate lines. How to avoid the problem of displaying the tooltip in a single line with mozilla firefox.
View Replies !
Change The Title
I'm trying to change the title on just my home page. Can anyone help me where I should insert it and how I should insert it in this code. <title><?php if ( get_bloginfo('version') < ƈ' ) : echo wp_title('',false); if (!is_home() ) : echo ' - ' endif; elseif ( is_search() ) : echo wp_specialchars($s).' - ' elseif ( is_category() ) : single_cat_title(''); echo ' - ' elseif ( is_year() ) : echo get_the_time('F').' - ' elseif ( is_month() ) : echo get_the_time('F Y').' - ' elseif ( is_day() ) : echo get_the_time('F jS, Y').' - ' elseif ( is_404() ) : echo "Not found - "; elseif (!is_home() ) : if ( get_the_title() ){ the_title(); }else{ echo "Untitled"; }; echo " - "; endif // is_search()?> <?php bloginfo('name')?></title>
View Replies !
Accessing The Next Title
I access the current page title as $row['title']; which is within a while loop. Now how do i access the title of the next row in database? something like $row['title'+1]; gives me an output as 1 .
View Replies !
Add Html Title
How do you add a (html title) to this image? $Cat .= "<tr> <td style="padding:0px"> <caption align=center style="padding:0px"> <img src="myimages/pic1.gif" border="0" > </caption> </td> </tr>";
View Replies !
Dynamic Title With From Db
I use a header.php page and a content.php page. The header.php is of course just the header, the content.php is database driven. I want the article title on the content.php page to display in the Title bar. Code:
View Replies !
Preg_match For Title
I have a simple function that extracts the contents of <title> tag from the files in a given folder. function getTitle($filePath) { $content = file_get_contents($filePath); if(preg_match('#<title>(.+?)</title>#msi', $content, $matches)) { return $matches[1]; } return 'Untitled' } However, some pages contain the title as <title><? echo $thisPage; ?></title> and the function returns echo $thisPage; without interpretation. Could anyone help find out how to make this readable by preg_match?
View Replies !
|