Jump to content

IOAF

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

IOAF's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. hahaha this time it outputs this: were getting there... i think? edit: i notice its not finished ecoing the whole thing (the 3rd echo)
  2. Tried what you just posted water and got this error ( i cleaned up the brakes the forum put into the code) doesnt seem to like "else {"
  3. ok, i tried the "foreach($lines as $line){" and the page dident display anything again. from the top: this is whats in the text file (example): with the original code, the page will display only the top line, which on the site will read "quadbike" i need it to echo all the lines not just the top, and i cant figure out how to do that. so when i say lines i mean this is a line and this is another argh! edit: so the site should display: quadbike .1234cc .brakes .etc...
  4. Doesnt seem to work. but the way i have this coded now (ill put at the bottom of this post), would every line in the text file need to have 'albumdesc' at the beginning of it? its only there on the first line (what i assume php calls line[0]) if($IG_CONFIG['usedatafiles'] AND $IG_CONFIG['albumdescriptions']){ if(@file_exists($IG_CONFIG['imagedir'].$dir.'/idutgallerydata.txt')){ $lines = file($IG_CONFIG['imagedir'].$dir.'/idutgallerydata.txt'); foreach($content as $line){ if($line == "albumdesc"){ echo '<br/><div class="description">'; echo $line . '<br />'; echo '</div><br/>'; break; } } } }
  5. server has gone down now! i love coding websites will try that when it comes back up.
  6. Cheers for the help gear, i think im getting closer ive modified my code a little using what you put for using file() this makes sence to me how it should work... but on the page when you view it it doesnt show anything at all, no error but no text (and looking at the pages source its not outputting anything at all) argh! if($IG_CONFIG['usedatafiles'] AND $IG_CONFIG['albumdescriptions']){ if(@file_exists($IG_CONFIG['imagedir'].$dir.'/idutgallerydata.txt')){ $content = file($IG_CONFIG['imagedir'].$dir.'/idutgallerydata.txt'); foreach($content as $line){ if($line[0] == "albumdesc"){ echo '<br/><div class="description">'; echo $line . '<br />'; echo '</div><br/>'; break; } } } }
  7. i think i should be able to replace that bit of code with a new one that will open the txt file, and echo all the text in that file. can anyone help me wright that bit of code? im slowly getting there with php but im still struggling lol thanks
  8. i just cant figure it out. i get the idea of what your saying i just dont know what to actually do. not brilliant with php
  9. cheers for that! ill do my best to integrate it but im not really good with php, any pointer on what i should be replacing?
  10. Hi, this is probably something really easy or impossible knowing me. The script im using shows a description on a page, the description is inputed via a WYSIWYG editor that when you input your info into, saves to a file in multiple lines (as you would normally code the html that the WYSIWYG outputs) But my problem is getting the information back on the web page, the script uses the line echo trim($line[1]); which only reads from the first line, i know i could change 1 to 3 of 4 but i need it to output all the lines in the file. Ive looked on Google to try and find the different attributes to $line but i cant seem to figure out the problem. Is it possible? any help is much appreciated!
  11. Ok, spotted the problem *insert embarasment here* sorry guys lol
  12. Hi, im setting up a new site with an online store with php and msql. I have built the template into the php from [a href=\"http://www.phpwebcommerce.com/\" target=\"_blank\"]http://www.phpwebcommerce.com/[/a] and everything works fine. However im having problems with a frame border and im unsure how to remove it. With html or css i would usually use border="0" or {border:0;} but as the frame is made from the require_once function im unsure what to use here. Ive tried CSS on the main page and the page the require_once is targeted at to remove the border with no sucsess, and also the tables with the require_once php set to border="0" Here is my coding for the main page: [code] <?php require_once 'library/config.php'; require_once 'library/category-functions.php'; require_once 'library/product-functions.php'; require_once 'library/cart-functions.php'; $_SESSION['shop_return_url'] = $_SERVER['REQUEST_URI']; $catId  = (isset($_GET['c']) && $_GET['c'] != '1') ? $_GET['c'] : 0; $pdId   = (isset($_GET['p']) && $_GET['p'] != '') ? $_GET['p'] : 0; require_once 'include/header.php'; ?> <style type="text/css"> table { border: 0px; } frame{ border: 0px; } </style> <body bgcolor="f0f0f0" text="#CCCCCC" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <center> <table border="1" align="center" cellpadding="0" cellspacing="0" width="760" style="border:0px;">   <tr>     <td colspan="5" border="0" width="760">       <?php require_once 'include/top.php'; ?>     </td>   </tr>   </table>      <table border="1" align="center" cellpadding="0" cellspacing="0" width="760" height="400">   <tr>     <td colspan="5" border="0" width="13" background="../images/site_08.gif"></td>          <td colspan="5" border="0" width="135" bgcolor="#FFFFFF" id="leftnav">     <?php require_once 'include/leftNav.php'; ?>     </td>          <td colspan="5" border="0" width="464" bgcolor="#FFFFFF">     <?php if ($pdId) {     require_once 'include/productDetail.php'; } else if ($catId) {     require_once 'include/productList.php'; } else {     require_once 'include/categoryList.php'; } ?>     </td>          <td colspan="5" border="0" width="113" bgcolor="#FFFFFF">     <?php require_once 'include/miniCart.php'; ?>     </td>          <td colspan="5" border="0" width="15" background="../images/site_11.gif"></td>        </tr>   </table>   <table>       <tr>     <td colspan="5" background="../images/site_12.gif" width="760" height="39">            </td>   </tr> </table> </center>[/code] Can anyone help point out where im going wrong here? Help is much apriciated :) 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.