Jump to content

damian0612

Members
  • Posts

    34
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

damian0612's Achievements

Member

Member (2/5)

0

Reputation

  1. checked and seen curl was disabled but get a new error after enabling curl: updateFeed(1) Unable to open RSS Feed http://newsrss.bbc.co.uk/rss/sporton...erpool/rss.xml with error No URL set!, exiting updateFeed(5) Unable to open RSS Feed http://www.imscouting.com/teams/engl...erpool-fc/rss/ with error No URL set!, exiting
  2. And I should have said when the script is called when the rss url is made active for the first time I get this: Unable to open RSS Feed http://newsrss.bbc.co.uk/rss/sportonline_uk_edition/football/teams/l/liverpool/rss.xml with error HTTP ERROR: 404, exiting thanks
  3. Hi, thanks for the reply, I don't get any errors, when I access the page which is http://newslfc.com/script/rss2sql.php it should echo each feed it has parsed on the page and put the info into the mysql database but the page is blank and nothing has been entered into the database. When I look at the admin panel where the feeds are kept it just says 'open failed' beside each feed. the error I get from my log when I had a cron set to acess the script was: URL: http://www.newslfc.com/script/rss2sql.php HTTP/1.0 500 Internal Server Error Date: Sat, 25 Jun 2011 08:52:08 GMT Server: Apache/2.2.19 (FreeBSD) mod_ssl/2.2.19 OpenSSL/0.9.8q DAV/2 PHP/5.2.17 with Suhosin-Patch X-Powered-By: PHP/5.2.17 Content-Length: 18 Connection: close Content-Type: text/html updateFeed(2)<br> Is there any info I can post to help you get a better understanding or might help? the php script itself is very large, it was one I purchased. thanks Damian
  4. Hi I have a php script that parses rss feeds and adds them to a mysql database and it was working fine until I changed hosts taking out vps hosting. Now I've changed the php script won't parse the rss feeds anymore. I am assuming that I need to configure some settings like a php extension or something but really don't have a clue being a real amateur at this sort of thing. I would therefore appreciate any help. I don't know if it'll help but here is a link to my php info http://snipurl.com/1bkrge Thanks Damian
  5. Thanks for the advice, went over my code & found I hadn't added this: $id = $_GET["id"]; also need to pass the id into the links again for the next pages, great help, cheers
  6. I have used the basic pagination tutorial from phpfreaks to create page links at the bottom of the page and it works fine when you want to browse all the table info. However, If I only want to browse the info where the category column is equal to say 'birthday' then it doesn't seem to facilitate this. Is there a work around for this? So the code: $sql = "SELECT * FROM cardlist LIMIT $offset, $rowsperpage"; works fine, but when I change it to this: $sql = "SELECT * FROM cardlist WHERE category = '$id' LIMIT $offset, $rowsperpage"; The results are blank. I attach the full code. Any help would be appreciated. Thanks [attachment deleted by admin]
  7. I have changed the contained to have height of 100% and that has helped as the menus were hanging under the div, but the meanus still aren't straight, how do I straighten the menus? thanks
  8. Hi I'm having problems trying to align rows within a table correctly. Having been trying for ages and just can't figure out how to fix it. It doesn't align too bad in firefox but its a mess in IE. Here is the page: www.mo-ait.com/testpage.php Here is the html: <div id="container"> <div id="header"> <a href="/" id="logo"><img src="/images/topheader.png" height="100px" width="900px" border="0"/></a> </div> <div id="search_container"> <?php require_once ("mysearch.php"); ?> </div> here is the php include file that includes the table: <div id="search_left"> <?php $quer2=mysql_query("SELECT DISTINCT category,cat_id FROM cardlist ORDER by category"); $cat=$_GET['cat']; //This line is added to take care if your global variable is off if(strlen($cat) > 0 and !is_numeric($cat)){ //check if $cat is numeric data or not. echo "Data Error"; exit; } if(isset($cat) and strlen($cat) > 0){ $quer=mysql_query("SELECT DISTINCT subcategory FROM cardlist where cat_id=$cat ORDER by subcategory"); }else{$quer=mysql_query("SELECT DISTINCT subcategory FROM cardlist ORDER by subcategory"); } echo "<table><tr><td>"; echo "What's it for? </td><td>"; echo "<form method=post name=f1 action=''>"; /// Add your form processing page address to //action in above line. Example action=dd-check.php//// ////////// Starting of first drop downlist ///////// echo "<select name='cat' onchange=\"reload(this.form) \"><option value=''>Select one</option>"; while($noticia2 = mysql_fetch_array($quer2)) { if($noticia2['cat_id']==@$cat) {echo "<option selected value='$noticia2[cat_id]'>$noticia2[category]</option>"."<BR>";} else{ echo "<option value='$noticia2[cat_id]'>$noticia2[category]</option>";} } echo "</select>"; echo "</td><td>"; ////////////////// This will end the first drop down list /////////// echo "</td><td>"; echo "Who's it for? </td><td>"; ////////// Starting of second drop downlist ///////// echo "<select name='subcat'><option value=''>Select one</option>"; while($noticia = mysql_fetch_array($quer)) { echo "<option value='$noticia[subcategory]'>$noticia[subcategory]</option>"; } echo "</select>"; ////////////////// This will end the second drop down list /////////// // add your other form fields here //// echo "<input type=submit value=Submit>"; echo "</form>"; echo "</td></tr></table>"; echo "</div>"; echo "<div id='search_right'>"; echo "<form name='myform2' action='/search.php' method='GET'>"; echo "<input name='search_all' input type='text' value='search'/>"; echo "<input type='submit' value='Submit'/>"; echo "</form>"; echo "</div>"; ?> and here is the css: div#search_container{background-image:url(/images/header.jpg); margin-top:-5px;float:left;height:40px;} div#search_left{float:left;margin-left:10px;color:#FFFFFF;font-weight:bold;width:650px;} div#search_right{float:right;margin-right:10px;color:#FFFFFF;font-weight:bold;width:230px;} I would appreciate any help at all on this, thanks
  9. Thank you so much, I have now fixed it, I appreciate your help, cheers
  10. Can someone please explain how I can fix a problem I have. I have a page where I have a php include which is for a search menu at the top of a page under a header. The code works perfectly when viewed on firefox but it displays totally wrong on IE and I'm stumped as to why. I'm not sure if it is a problem with my php include, html or css. Here is the page: www.mo-ait.com/testpage.php Here is the html: <div id="container"> <div id="header"> <a href="/" id="logo"><img src="/images/header2.jpg" height="100px" width="900px" border="0"/></a> </div> <div id="search_container"> <?php require_once ("mysearch.php"); ?> </div> here is the php include file: <div id="search_left"> <?php $quer2=mysql_query("SELECT DISTINCT category,cat_id FROM cardlist ORDER by category"); $cat=$_GET['cat']; //This line is added to take care if your global variable is off if(strlen($cat) > 0 and !is_numeric($cat)){ //check if $cat is numeric data or not. echo "Data Error"; exit; } if(isset($cat) and strlen($cat) > 0){ $quer=mysql_query("SELECT DISTINCT subcategory FROM cardlist where cat_id=$cat ORDER by subcategory"); }else{$quer=mysql_query("SELECT DISTINCT subcategory FROM cardlist ORDER by subcategory"); } echo "<table><tr><td>"; echo "What's it for? </td><td>"; echo "<form method=post name=f1 action=''>"; /// Add your form processing page address to //action in above line. Example action=dd-check.php//// ////////// Starting of first drop downlist ///////// echo "<select name='cat' onchange=\"reload(this.form) \"><option value=''>Select one</option>"; while($noticia2 = mysql_fetch_array($quer2)) { if($noticia2['cat_id']==@$cat) {echo "<option selected value='$noticia2[cat_id]'>$noticia2[category]</option>"."<BR>";} else{ echo "<option value='$noticia2[cat_id]'>$noticia2[category]</option>";} } echo "</select>"; echo "</td><td>"; ////////////////// This will end the first drop down list /////////// echo "</td><td>"; echo "Who's it for? </td><td>"; ////////// Starting of second drop downlist ///////// echo "<select name='subcat'><option value=''>Select one</option>"; while($noticia = mysql_fetch_array($quer)) { echo "<option value='$noticia[subcategory]'>$noticia[subcategory]</option>"; } echo "</select>"; ////////////////// This will end the second drop down list /////////// // add your other form fields here //// echo "<input type=submit value=Submit>"; echo "</form>"; echo "</td></tr></table>"; echo "</div>"; echo "<div id='search_right'>"; echo "<form name='myform2' action='/search.php' method='GET'>"; echo "<input name='search_all' input type='text' value='search'/>"; echo "<input type='submit' value='Submit'/>"; echo "</form>"; echo "</div>"; ?> and here is the css: div#search_container{background-image:url(/images/header.jpg); margin-top:-5px;line-height:40px;padding: 0;valign:top;} div#search_left{float:left;margin:10;color:#FFFFFF;font-weight:bold;valign:top;} div#search_right{float:right;margin-right:10px;color:#FFFFFF;font-weight:bold;valign:top;} Would appreciate any help at all on this, thanks
  11. Thanks for that advice, done as you have said and it works perfectly now, cheers and thanks alot
  12. Thanks bloodshooter but I'd prefer to try and continue my learning using the current method, cheers
  13. Hi Thanks for the reply but I'm not sure how to do as you have advised. Here is the code I have & I'd appreciate any help in changing the code to meet my needs: $quer2=mysql_query("SELECT DISTINCT category,cat_id FROM category order by category"); $cat=$_GET['cat']; //This line is added to take care if your global variable is off if(strlen($cat) > 0 and !is_numeric($cat)){//check if $cat is numeric data or not. echo "Data Error"; exit; } if(isset($cat) and strlen($cat) > 0){ $quer=mysql_query("SELECT DISTINCT subcategory FROM subcategory where cat_id=$cat order by subcategory"); }else{$quer=mysql_query("SELECT DISTINCT subcategory FROM subcategory order by subcategory"); } echo "<form method=post name=f1 action=''>"; /// Add your form processing page address to action in above line. Example action=dd-check.php//// ////////// Starting of first drop downlist ///////// echo "<select name='cat' onchange=\"reload(this.form)\"><option value=''>Select one</option>"; while($noticia2 = mysql_fetch_array($quer2)) { if($noticia2['cat_id']==@$cat){echo "<option selected value='$noticia2[cat_id]'>$noticia2[category]</option>"."<BR>";} else{echo "<option value='$noticia2[cat_id]'>$noticia2[category]</option>";} } echo "</select>"; ////////////////// This will end the first drop down list /////////// ////////// Starting of second drop downlist ///////// echo "<select name='subcat'><option value=''>Select one</option>"; while($noticia = mysql_fetch_array($quer)) { echo "<option value='$noticia[subcategory]'>$noticia[subcategory]</option>"; } echo "</select>"; ////////////////// This will end the second drop down list /////////// // add your other form fields here //// echo "<input type=submit value=Submit>"; echo "</form>";
  14. Hi I am trying to create 2 dropdown lists for a category & sub_category. The options are stored in one mysql table and i want the relevant sub_category to display depending on what category has been selected. I found some code that does this if they category & sub_category are held in different tables but I'm not sure what I would need to change to make it work within just 1 table. Here is the code: http://www.plus2net.com/php_tutorial/php_drop_down_list.php Any help would be appreciated, thanks
×
×
  • 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.