PHP - Youtube Api Standard Feeds On Website?
Hi there,
I'm wondering If anyone can assist me. I am currently a design student In Leeds, UK. I'm currently creating an online campaign whereby customers use QR codes to link to a created website with interesting youtube video on. At the moment I've just created a simple link to the chosen content http://newmedia.leeds.ac.uk/ug10/cs10dw/culture.html However I've come across Youtube API Standard feeds on the Youtube Reference Guide. http://code.google.com/apis/youtube/2.0/reference.html It states you can 'send a GET request to the URL associated with that feed', however, I've never really touched php before. Could anyone give me advise on how I would link say the Top rated feed to my site using https://gdata.youtube.com/feeds/api/standardfeeds/top_rated Would that be difficult? ANY replies would be much appreciated! Regards David. Similar TutorialsHi
I'm looking for some advice on how to parse an xml feed and display any odds on my site
Here is an example http://feed.youwincd...in_football.xml
and as you can see it is quite large so calling it every time would have an impact on the server.
I am looking at using many different feeds in the future so want to start this properly and in a scaleable way.
I want to use php but open to any ideas on the best way to do this
Many thanks
Sam
Hi All, Newbie here.
I run a website using xmb forums software as a base login script to connect to my database and created my own crude and simple pages for adding and displaying the data learning as I went. Over the years with recent upgrades of php versions its now virtually useless and unsecure code. I archive a lot of news articles but have had trouble pasting text that includes apostrophe's and special characters, but managed to fix that using addslashes() now. Can someone suggest a tutorial or a way to rebuild my site from scratch or something I can use as a template to connect to my pages ?. i know you get embed code from youtube videos. How do i put the code into my website. Do i store the code in mysql? and how do i get php to display it? How could I from the varying URLs parse only the YouTube video ID? http://www.youtube.com/watch?v=SwrawcORlp0&feature=player_embedded http://www.youtube.com/watch?v=SwrawcORlp0&feature=popular How can I from the URLs above only extract the id into a variable $url SwrawcORlp0 Thanks, df Hi i have a simple blog which is stored in a table called messages, i have tried to create an rss feed that poeple can link to but am a bit stuck. the feed does not validate with the error code of: Sorry This feed does not validate. line 15, column 2: XML parsing error: <unknown>:15:2: not well-formed (invalid token) [help] Code: [Select] $sql = "SELECT title FROM messages ORDER BY date_added DESC limit 0,10"; Anybody got any ideas on this please, have read the rss pages and can comsume a fedd ok just cant produce one. Code: [Select] <?php $host = ""; $user = ""; $pass = ""; $port = "3306"; $database = "uni"; $MySQL = mysql_connect( "$host:$port", $user, $pass ); mysql_select_db( $database, $MySQL) or die ( "Couldn't open $database: ".mysql_error() ); ?> // Get latest items from db $sql = "SELECT title FROM messages ORDER BY date_added DESC limit 0,10"; $rst = mysql_query($sql); // Loop through data and build feed items $items = ""; while($a_row = mysql_fetch_assoc($rst)) { $items.= "<item>"; $items.= " <title>{$rst['title']}</title>"; $items.= " <link>{$rst['link']}</link>"; $items.= " <description>{$rst['description']}</description>"; $items.= "</item>"; } // Build feed text $feed = "<?xml version=\"1.0\"?>"; $feed.= "<rss version=\"2.0\">"; $feed.= " <channel>"; $feed.= " <title>My cool feed</title>"; $feed.= " <link>http://mi-linux.wlv.ac.uk/~0274148/AWT/blog/index.php</link>"; $feed.= " <description>A cool feed</description>"; $feed.= " $items"; $feed.= " </channel>"; $feed.= "</rss>"; // Display feed text echo $feed; Hi again, What i am after is receiving some RSS feed from another website and displaying it on mine. Well i am not familiar with RSS feeds and how can i style them with CSS, so they match the layout of my website. I want to display the RSS feeds with PHP so they are effective with SEOS rather than using Javascript. Could some one point at a good tutorial or guide me in the right direction. It would be much appreciated thanks. Hi, I kow this is probably something simple, but i have 2 links to a RSS feed which i need to put up on a web page. Not just a link, but the actual feed rendered with a number of news headlines. One is a ".rss2.XML" link and the ither is a html link. the HTML i suppose is static, so probably not any good. thanks in advance Hi, I am looking to have multiple RSS feeds coming populating into one list sorted by latest. Does anyone know or have any codes they are willing to share, even if it is just to get me started? Any help is much appreciated. This is for a charitable website so your time, help & expertise are much appreciated. I'm using the following code to grab an RSS feed and parse it into an array: Code: [Select] $doc = new DOMDocument(); $doc->load('http://MySite.com/feed/'); $arrFeeds = array(); foreach ($doc->getElementsByTagName('item') as $node) { $itemRSS = array ( 'title' => $node->getElementsByTagName('title')->item(0)->nodeValue, 'desc' => $node->getElementsByTagName('description')->item(0)->nodeValue, 'link' => $node->getElementsByTagName('link')->item(1)->nodeValue, 'date' => $node->getElementsByTagName('pubDate')->item(0)->nodeValue ); array_push($arrFeeds, $itemRSS); }My problem is that there is one tag I'd like to access, but don't quite know how... It is: <content:encoded> I've looked at 'content' => $node->getElementsByTagName('content:encoded')->item(1)->nodeValue and 'content' => $node->getElementsByTagName('content')->item(1)->nodeValue But neither work. Any ideas? I have a blog i created and i want to be able to create a page that can deal with the rss feeds. I have never done it before so if any one can give me some sugestions thats would be great. If one inserts acute letters, grave letters, ampersands and accented letters in xhtml they show perfectly on the page. However if one uses insert or rss feed they show as � or a square. How does one make them show correctly. Hello, I'm using pbb forum http://xemix.pl/ When I tried to get topics using rss feeds module, I got this error. Code: [Select] Fatal error: Uncaught exception 'Exception' with message 'Erroe occured while loading url by cURL. Couldn't resolve host 'pbboard.com'' in /home/a5402323/public_html/includes/FeedParser.php:226 Stack trace: #0 /home/a5402323/public_html/includes/FeedParser.php(157): FeedParser->getUrlContent() #1 /home/a5402323/public_html/modules/admin/feeder.module.php(218): FeedParser->parse('http://absba.or...') #2 /home/a5402323/public_html/modules/admin/feeder.module.php(49): PowerBBFeederMOD->_AddFeedStart() #3 /home/a5402323/public_html/admin.php(89): PowerBBFeederMOD->run() #4 {main} thrown in /home/a5402323/public_html/includes/FeedParser.php on line 226 the host said thet Hello,cURL is installed by default here Many Thanks,Helpdesk Staff any help !!!! Currently I run a site that aggregates jobs about 100 cities so far and its starting to slow down my sites resources, I use a wordpress plugin to bring in the jobs but its giving me a resources alert.
My traffics not that high as of yet, but I'm worried about it causing problems on my shared hosting.
Server is running apache. Slow for wordpress?
Was just wondering best way to bring in multiple cities (thousands) /feeds and add category for each.
Hello everyone, I am having problem trying to fetch data from certain feeds. The problem is, the feeds aren't just using XML or just atom, it is a combo of both. Here is an example of YouTube's feed: Code: [Select] <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:media='http://search.yahoo.com/mrss/' xmlns:gd='http://schemas.google.com/g/2005' xmlns:yt='http://gdata.youtube.com/schemas/2007'><id>http://gdata.youtube.com/feeds/api/videos/qzUuAIPPrGQ</id><published>2010-11-02T15:10:24.000Z</published><updated>2010-11-04T22:09:22.000Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#video'/><category scheme='http://gdata.youtube.com/schemas/2007/categories.cat' term='Film' label='Film & Animation'/><category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='mysteryguitarman'/><category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='mystery'/><category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='guitar'/><category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='man'/><category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='mgm'/><category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='joe'/><category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='penna'/><category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='jp'/><category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='balinese'/><category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='bali'/><category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='instruments'/><title type='text'>Bali Instruments</title><content type='text'>Behind the Scenes: http://bit.ly/BehindTheScenesBali Click to Tweet: http://bit.ly/ClickToTweetBali Watch my other videos: http://www.youtube.com/MysteryGuitarMan My second channel: http://www.youtube.com/jp Twitter's cool... right? http://www.twitter.com/MysteryGuitarM Send me things: Mystery Guitar Man PO Box 2966 Hollywood, CA 90078 -Subtitles- Portuguese: http://youtube.com/ands159</content><link rel='alternate' type='text/html' href='http://www.youtube.com/watch?v=qzUuAIPPrGQ&feature=youtube_gdata'/><link rel='http://gdata.youtube.com/schemas/2007#video.responses' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/videos/qzUuAIPPrGQ/responses'/><link rel='http://gdata.youtube.com/schemas/2007#video.related' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/videos/qzUuAIPPrGQ/related'/><link rel='http://gdata.youtube.com/schemas/2007#mobile' type='text/html' href='http://m.youtube.com/details?v=qzUuAIPPrGQ'/><link rel='self' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/videos/qzUuAIPPrGQ'/><author><name>MysteryGuitarMan</name><uri>http://gdata.youtube.com/feeds/api/users/mysteryguitarman</uri></author><gd:comments><gd:feedLink href='http://gdata.youtube.com/feeds/api/videos/qzUuAIPPrGQ/comments' countHint='10222'/></gd:comments><media:group><media:category label='Film & Animation' scheme='http://gdata.youtube.com/schemas/2007/categories.cat'>Film</media:category><media:content url='http://www.youtube.com/v/qzUuAIPPrGQ?f=videos&app=youtube_gdata' type='application/x-shockwave-flash' medium='video' isDefault='true' expression='full' duration='123' yt:format='5'/><media:content url='rtsp://v6.cache6.c.youtube.com/CiILENy73wIaGQlkrM-DAC41qxMYDSANFEgGUgZ2aWRlb3MM/0/0/0/video.3gp' type='video/3gpp' medium='video' expression='full' duration='123' yt:format='1'/><media:content url='rtsp://v3.cache7.c.youtube.com/CiILENy73wIaGQlkrM-DAC41qxMYESARFEgGUgZ2aWRlb3MM/0/0/0/video.3gp' type='video/3gpp' medium='video' expression='full' duration='123' yt:format='6'/><media:description type='plain'>Behind the Scenes: http://bit.ly/BehindTheScenesBali Click to Tweet: http://bit.ly/ClickToTweetBali Watch my other videos: http://www.youtube.com/MysteryGuitarMan My second channel: http://www.youtube.com/jp Twitter's cool... right? http://www.twitter.com/MysteryGuitarM Send me things: Mystery Guitar Man PO Box 2966 Hollywood, CA 90078 -Subtitles- Portuguese: http://youtube.com/ands159</media:description><media:keywords>mysteryguitarman, mystery, guitar, man, mgm, joe, penna, jp, balinese, bali, instruments</media:keywords><media:player url='http://www.youtube.com/watch?v=qzUuAIPPrGQ&feature=youtube_gdata_player'/><media:thumbnail url='http://i.ytimg.com/vi/qzUuAIPPrGQ/2.jpg' height='90' width='120' time='00:01:01.500'/><media:thumbnail url='http://i.ytimg.com/vi/qzUuAIPPrGQ/1.jpg' height='90' width='120' time='00:00:30.750'/><media:thumbnail url='http://i.ytimg.com/vi/qzUuAIPPrGQ/3.jpg' height='90' width='120' time='00:01:32.250'/><media:thumbnail url='http://i.ytimg.com/vi/qzUuAIPPrGQ/0.jpg' height='240' width='320' time='00:01:01.500'/><media:title type='plain'>Bali Instruments</media:title><yt:duration seconds='123'/></media:group><gd:rating average='4.970053' max='5' min='1' numRaters='40338' rel='http://schemas.google.com/g/2005#overall'/><yt:statistics favoriteCount='10811' viewCount='705760'/></entry> What do you recommend doing to getting data out of feeds such as this? Thank you, weee I have a full-text RSS component for Joomla that I was trying to modify. I wanted to be able to truncate the article to a given number of words and place a link at the end for the rest of the article. I need help figuring out how to add a link to the end of the source article. Added this script to the post.php file. It sort of works but the "$ending" tag doesn't seem to function since there is no "..." appended to the end of articles posted, when I tested it. public function truncate($text, $length = 200, $ending = '...', $exact = true, $considerHtml = false) { if ($considerHtml) { // if the plain text is shorter than the maximum length, return the whole text if (str_word_count(preg_replace('/<.*?>/', '', $text)) <= $length) { return $text; } // splits all html-tags to scanable lines preg_match_all('/(<.+?>)?([^<>]*)/s', $text, $lines, PREG_SET_ORDER); $total_length = str_word_count($ending); $open_tags = array(); $truncate = ''; foreach ($lines as $line_matchings) { // if there is any html-tag in this line, handle it and add it (uncounted) to the output if (!empty($line_matchings[1])) { // if it's an "empty element" with or without xhtml-conform closing slash (f.e. <br/>) if (preg_match('/^<(\s*.+?\/\s*|\s*(img|br|input|hr|area|base|basefont|col|frame|isindex|link|meta|param)(\s.+?)?)>$/is', $line_matchings[1])) { // do nothing // if tag is a closing tag (f.e. </b>) } else if (preg_match('/^<\s*\/([^\s]+?)\s*>$/s', $line_matchings[1], $tag_matchings)) { // delete tag from $open_tags list $pos = array_search($tag_matchings[1], $open_tags); if ($pos !== false) { unset($open_tags[$pos]); } // if tag is an opening tag (f.e. <b>) } else if (preg_match('/^<\s*([^\s>!]+).*?>$/s', $line_matchings[1], $tag_matchings)) { // add tag to the beginning of $open_tags list array_unshift($open_tags, strtolower($tag_matchings[1])); } // add html-tag to $truncate'd text $truncate .= $line_matchings[1]; } // calculate the length of the plain text part of the line; handle entities as one character $content_length = str_word_count(preg_replace('/&[0-9a-z]{2,8};|&#[0-9]{1,7};|[0-9a-f]{1,6};/i', ' ', $line_matchings[2])); if ($total_length+$content_length> $length) { // the number of characters which are left $left = $length - $total_length; $entities_length = 0; // search for html entities if (preg_match_all('/&[0-9a-z]{2,8};|&#[0-9]{1,7};|[0-9a-f]{1,6};/i', $line_matchings[2], $entities, PREG_OFFSET_CAPTURE)) { // calculate the real length of all entities in the legal range foreach ($entities[0] as $entity) { if ($entity[1]+1-$entities_length <= $left) { $left--; $entities_length += str_word_count($entity[0]); } else { // no more characters left break; } } } $truncate .= substr($line_matchings[2], 0, $left+$entities_length); // maximum lenght is reached, so get off the loop break; } else { $truncate .= $line_matchings[2]; $total_length += $content_length; } // if the maximum length is reached, get off the loop if($total_length>= $length) { break; } } } else { if (str_word_count($text) <= $length) { return $text; } else { $truncate = substr($text, 0, $length - str_word_count($ending)); } } // if the words shouldn't be cut in the middle... if (!$exact) { // ...search the last occurance of a space... $spacepos = strrpos($truncate, ' '); if (isset($spacepos)) { // ...and cut the text in this position $truncate = substr($truncate, 0, $spacepos); } } // add the defined ending to the text $truncate .= $ending; if($considerHtml) { // close all unclosed html-tags foreach ($open_tags as $tag) { $truncate .= '</' . $tag . '>'; } } return $truncate; } I have attached the whole file as well if you want to see the rest. This part of the script has the function that originally automatically added the link to the source article: if($link_original==1){ if(strlen($ret->fullText)) $ret->fullText.="<p><a href='". $item->link."' target='_blank'>".$text_link_original."</a></p>"; else $ret->introText.="<p><a href='". $item->link."' target='_blank'>".$text_link_original."</a></p>"; } The problem is that it gets truncated with the rest of the article now. Hi there all, I want to pull news feeds, from a web site and display them .... I have forgot what commands to use to do this. please help. Any example, i am most grateful. I am looking to finally move to a popular coding style. Anyone know any great ones I should look into? So far I have looked into PEAR. Thanks! The raw output is this.. full example: http://instant.simplyhired.com/a/jobs/xml-v1/l-06238/q-engineer/ws-100/si-0/fdb-21/sb-rd/mi-10 I can generally get the value of this stuff.. like if I wanted the "jt" line I can get ENGINEER, and the rest of the data.. what i am having trouble with is getting the attribute (i think thats the right term for this with XML). For example the "src" line it as an attribute "url=" I am trying to figure out how to get that value.. Below is a sample of the raw.. and below that is the code I am working with to load up the XML. I know theres simple_xml but in my case thats not an option so I am working on slightly custom work (as little as it is). Code: [Select] <r> <jt>ENGINEER</jt> <cn url="">Soldream</cn> <src url="http://instant.simplyhired.com/a/job-details/view/jobkey-5109.J3H3036RVZPZ4RFRRKR/jp-0/hits-70?aff_id=2512">CareerBuilder</src> <loc cty="Tolland" st="CT" postal="06084" county="" region="" country="US">Tolland, CT</loc> <ls>2011-02-20T13:28:39Z</ls> <dp>2011-02-18T08:00:00Z</dp> <e>Engineer/CNC Machinist Tolland CT2429177 Aerospace MFG Co. seeks MFG/Design Engineer &amp; CNC Machinist with 5+ years of experience in aerospace manufacturing. Duties for engineers include developing new processes, drafting, and CNC programming. CNC Machinist should have knowledge of FANUC control. Send resume to...</e> <af></af> <pl url=""/> </r> $feedURL = 'http://instant.simplyhired.com/a/jobs/xml-v1/l-06238/q-engineer/ws-100/si-0/fdb-21/sb-rd/mi-10'; $doc = new DOMDocument(); $doc->load($feedURL); $arrFeeds = array(); foreach ($doc->getElementsByTagName('r') as $node) { $itemRSS = array ( 'title' => $node->getElementsByTagName('jt')->item(0)->nodeValue, 'desc' => $node->getElementsByTagName('description')->item(0)->nodeValue, 'link' => $node->getAttributeNode('src'), 'date' => $node->getElementsByTagName('pubDate')->item(0)->nodeValue, 'creator' => $node->getElementsByTagName('creator')->item(0)->nodeValue, 'permaz' => $node->getElementsByTagName('guid')->item(0)->nodeValue ); array_push($arrFeeds, $itemRSS); //print_r($arrFeeds); } array_unique($arrFeeds); ?> This is the simplest of forms, but it has no character. It is the type I use in everything. form1.php <html> <head> </head> <body> <?php // Connect to database===================================================== include("connect_db.php"); // retrieve form data ====================================================== $id = $_POST['id']; // sending query =========================================================== $query = "SELECT ama,model_name,model_mfg,wingspan,engine,decibels FROM airplanes WHERE id='$id'"; if( !$result = mysql_query($query) ) { echo "<br>Query $query<br>Failed with error: " . mysql_error() . '<br>'; } else { $fetch = mysql_fetch_array( $result ); } // $fetch = mysql_fetch_array(mysql_query("SELECT ama,model_name,model_mfg,wingspan,engine,decibels FROM airplanes // WHERE id='$id'")); // Output form with retrieved data ========================================== ?> <h3>Change the data and then click the CHANGE button</h3><br> <form name="myForm" action="delete_airplanes.php" onsubmit="return validateForm()" method="post"> ID #:<input type="text" name="id" value="<?=$fetch[id]?>" /><br> AMA #:<input type="text" name="ama" value="<?=$fetch[ama]?>" /><br> Model Name:<input type="text" name="model_name" value="<?=$fetch[model_name]?>" /><br> Model Mfg:<input type="text" name="model_mfg" value="<?=$fetch[model_mfg]?>" /><br> Wingspan:<input type="text" name="wingspan" value="<?=$fetch[wingspan]?>" /><br> Engine:<input type="text" name="engine" value="<?=$fetch[engine]?>" /><br> Decibels:<input type="text" name="decibels" value="<?=$fetch[decibels]?>" /><br><br> <input name="submit" id="submit" value="CHANGE!" type="submit"> </form> <br> <body> </html> I would love to be able to get this form to work. <!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"> <head> <title>Enter Airplane Data</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta name="language" content="en" /> <style type="text/css"> .focus { background: #FEF1C1; } .class123-label { font-family: Verdana; font-size: small; } .class123-sidebyside { float:left; margin:0 5px 0 0;} .class123-twocol { float:left; width:45%; margin:0 5px 0 0;} .class123-threecol { float:left; width:30%; margin:0 5px 0 0;} .class123-likert_style_li { display:inline-block; vertical-align:middle; text-align:center; top:0px; padding:2px; width:64px; height:50px; margin:0px; margin-right:1px; margin-bottom:1px; font:11px/18px verdana; background:#ddd; zoom:1; *display:inline; } .class123-likert_style_li2 { display:inline-block; vertical-align:middle; text-align:center; top:0px; padding:2px; width:64px; height:50px; margin:0px; margin-right:1px; margin-bottom:0px; font:12px/18px verdana; background:#fff; zoom:1; *display:inline; border-top:1px solid #ddd; } .fontbold { font-weight: bold; } .fontitalic { font-style: italic; } .requiredspan { font-family: Verdana; font-size:10px; color:#f00; } </style> </head> <body style="background-color: rgb(138, 174, 222); direction: ltr;"> <div style="height: 50px;"> </div> <center> <table style="border-collapse: collapse;" id="AutoNumber1" border="0" cellpadding="0" cellspacing="0" width="658"> <tbody> <tr> <td class="tdborder" colspan="3" width="658"> <img alt="shadow" class="tdimagesus" src="/templates/cache/dynamicimage-1-1560BD.png" height="9" width="100%" /> </td> </tr> <tr> <td height="38" width="4"> </td> <td class="tdheader" style="border-style: solid solid none; border-color: rgb(1, 76, 169) rgb(1, 76, 169) -moz-use-text-color; border-width: thin thin medium;" bgcolor="#1560bd" height="38" width="650"> <img alt="logo" src="http://www.123contactform.com/templates/logos/computers_anvelope_white.png" align="left" /> </td> <td height="38" width="4"> </td> </tr> <tr> <td height="171" width="4"> </td> <td class="tdmain" style="border-style: none solid; border-color: -moz-use-text-color rgb(1, 76, 169); border-width: medium thin; padding-right: 10px;" bgcolor="#ffffff" height="171" width="650"> <div class="selector-off"> <center> <script type="text/javascript"> <!-- function InputActions(field,id) { var i=1; var lid="none"; for (i=1;i<=100;i++) { lid='row'+i; lidsec='rowsec'+i; if (document.getElementById(lid) != null) { if (lid==id) { document.getElementById(lid).className='focus'; if (document.getElementById(lidsec) != null) document.getElementById(lidsec).className='focus'; } else { document.getElementById(lid).className=''; if (document.getElementById(lidsec) != null) document.getElementById(lidsec).className=''; } } } } //--> </script> <form class="form" action="http://www.123contactform.com/contact-form-crmamx-122034.html" method="post" enctype="multipart/form-data"><input name="action" value="verify" type="hidden" /> <table style="min-width: 250px;" cellpadding="4"> <tbody> <tr id="row1"> <td style="text-align: left;" valign="top"><label class="class123-label" id="id123-title684273" for="id123-control684273">Name:</label><span class="requiredspan customspan" title="Required field">*</span></td> <td style="" align="left"><input id="id123-control684273" name="control684273" onclick="InputActions(this,'row1');" onkeyup="InputActions(this,'row1');" onchange="" value="" size="20" type="text" /> </td> </tr> <tr id="row2"> <td style="text-align: left;" valign="top"><label class="class123-label" id="id123-title684275" for="id123-control684275">Subject:</label><span class="requiredspan customspan" title="Required field">*</span></td> <td style="" align="left"><input id="id123-control684275" name="control684275" onclick="InputActions(this,'row2');" onkeyup="InputActions(this,'row2');" onchange="" value="" size="20" type="text" /> </td> </tr> <tr id="row3"> <td style="text-align: left;" valign="top"><label class="class123-label" id="id123-title684281" for="id123-control684281">Model Name:</label><span class="requiredspan customspan" title="Required field">*</span></td> <td style="" align="left"><input id="id123-control684281" name="control684281" onclick="InputActions(this,'row3');" onkeyup="InputActions(this,'row3');" onchange="" value="" size="35" type="text" /> </td> </tr> <tr id="row4"> <td style="text-align: left;" valign="top"><label class="class123-label" id="id123-title684286" for="id123-control684286">Model Mfg:</label><span class="requiredspan customspan" title="Required field">*</span></td> <td style="" align="left"><input id="id123-control684286" name="control684286" onclick="InputActions(this,'row4');" onkeyup="InputActions(this,'row4');" onchange="" value="" size="35" type="text" /> </td> </tr> <tr id="row5"> <td style="text-align: left;" valign="top"><label class="class123-label" id="id123-title684287" for="id123-control684287">Wingspan:</label><span class="requiredspan customspan" title="Required field">*</span></td> <td style="" align="left"><input id="id123-control684287" name="control684287" onclick="InputActions(this,'row5');" onkeyup="InputActions(this,'row5');" onchange="" value="" size="35" type="text" /> </td> </tr> <tr id="row6"> <td style="text-align: left;" valign="top"><label class="class123-label" id="id123-title684288" for="id123-control684288">Engine Mfg/Size:</label><span class="requiredspan customspan" title="Required field">*</span></td> <td style="" align="left"><input id="id123-control684288" name="control684288" onclick="InputActions(this,'row6');" onkeyup="InputActions(this,'row6');" onchange="" value="" size="35" type="text" /> </td> </tr> <tr id="row7"> <td style="text-align: left;" valign="top"><label class="class123-label" id="id123-title684289" for="id123-control684289">Decibel Reading:</label><span class="requiredspan customspan" title="Required field">*</span></td> <td style="" align="left"><input id="id123-control684289" name="control684289" onclick="InputActions(this,'row7');" onkeyup="InputActions(this,'row7');" onchange="" value="" size="35" type="text" /> </td> </tr> <tr id="row8"> <td style="text-align: left;" valign="top"><label class="class123-label" for="id123-captcha" id="verifno">Verification No.:</label><span class="requiredspan customspan" title="Required field">*</span></td> <td align="left" valign="top"><input id="id123-captcha" onclick="InputActions(this,'row8');" onkeyup="InputActions(this,'row8');" name="txtNumber" value="" size="16" type="text" /></td> </tr> <tr> <td align="right"><a title="Don't know why you have to enter this verification number? Click here!" href="http://www.123contactform.com/faq.html#q1" onclick="window.open('http://www.123contactform.com/faq.html#q1','_blank','width=740, height=90, left=' + (screen.width/2-370) + ', top=250');return false;"><img src="http://www.123contactform.com/img/help_icon.gif" alt="contact form faq" border="0" /></a></td> <td align="left"><img alt="verification image" src="http://www.123contactform.com/random.php" /></td> </tr> <tr> <td></td> <td align="left"><input class="class123-button" id="id123-button-send" value="Send email" type="submit" /></td> </tr> </tbody> </table> <div style="height: 1px; display: none; visibility: hidden;"> <input name="email" type="text" /></div> </form> </center> </div> </td> <td height="171" width="4"></td> </tr> </tbody> </table> </center> </body> </html> Of course I did not write this. I have never used a form before built as a table, only like the form1.php 1. Does this form work in the same way? 2. I want to retrieve a record from the db and display it in this form. Do I do it in the same way as in form1.html with a value=? 3. If the above is true then I would assume (that always gets me in trouble) that in my next program (update_db.php) I would capture the input data the same. Thanks like contact form is there a help standard you guys might suggest? |