PHP - Edit Microsoft Word File On Website
Other than downloading the file, editing it on the local PC, saving it, and uploading it back to the server using some applicable script, any ideas?
Similar TutorialsHi all, I don't know if it is possible but i need to edit one word document, write the name of the customer in it, but at the right place and print it from a php form. The user write in that php form the customer id and if he exists, the system should modify the word template and print it. Do you think this is possible and if so how can i do that? Thanks in advance. Hugo Hello, i am currently getting an Microsoft Excel formatted text file whose save type is .Txt from a URL.I used to open it and will change the save type as excel file. Please suggest whether we can do this with php code. currently my code is like this, <? php copy("http://www.faa.gov/airports/airport_safety/airportdata_5010/menu/emergencyplanexport.cfm?Region=&District=&State=&County=&City=LAS%20VEGAS&Use=&Certification=","./contactsexport.xls"); ?> where as the contactsexport.xls type is .Txt which i need it in .xls Thanks in Advance. In this multi file upload form, choose three images, click submit and preview the images on the preview page. If the user wishes to delete or replace an image, click edit and the form will go back to the previous page. Select the replace radio button for example on one of the three images and select a new image from the file input prompt and click submit. The form will go to the preview page again to display the images. During this process the image names are being input into a table and the images are being moved to a directory. The table is `id` AUTO_INCREMENT, `image0` `image1` `image2` `status` So input name='image[image0]' can be directed to table `image0` and so on. The code for keep and delete work fine, but how do I replace an image? I have two foreach blocks. The first one deletes the image file from the directory and deletes the image name from the table, but the second foreach dose not move the new image file into the directory. Thanks. <input type='radio' name='image[image0]' value='keep' checked='checked'/> <input type='radio' name='image[image0]' value='delete' /> <input type='radio' name='image[image0]' value='replace' /> <input type="file" name="image[]" /> <input type='radio' name='image[image1]' value='keep' checked='checked'/> <input type='radio' name='image[image1]' value='delete' /> <input type='radio' name='image[image1]' value='replace' /> <input type="file" name="image[]" /> <input type='radio' name='image[image2]' value='keep' checked='checked'/> <input type='radio' name='image[image2]' value='delete' /> <input type='radio' name='image[image2]' value='replace' /> <input type="file" name="image[]" /> <?php if (isset($_POST['status'])) { $status = $_POST['status']; $confirm_code = $status; #--------------------------- replace -------------------------------------------- if (isset($_POST['submitted']) && ($image = $_POST['image'])) { foreach($image as $imageKey => $imageValue) { if ($imageValue == 'replace') { $query = "SELECT $imageKey FROM table WHERE status = '$status' "; if($result = $db->query( $query )){ $row = $result->fetch_array(); } unlink( UPLOAD_DIR.$row[0] ); $query = "UPDATE table SET $imageKey = '' WHERE status = '$status' "; } } foreach($image as $imageKey => $imageValue) { if ($imageValue == 'replace') { $filenm = $_FILES['image']['name']; $file = $_FILES['image']['tmp_name']; move_uploaded_file($file, UPLOAD_DIR . $filenm); $filename[] = $filenm; $query = "INSERT INTO table VALUES ('','$filename[0]','$filename[1]','$filename[2]','$confirm_code')"; } } } } ?> ok I have text files with my logins to my emails and such.. Well I have this script to prepare the logins for another script the files with the logins are in this format email pass email pass email pass email pass $filename = 'text.txt'; $file = file($filename); $begin = "$"; foreach($file as $b){ list($email,$password) = explode(" ",$b); $emails[] = $begin."header[]=get_header('".$email."','".$password."');";} file_put_contents($filename,implode($emails)); echo "Text file edited"; sleep(5); Is what I am using to get the email and password in this format $header[]=get_header('email','pass'); but it is putting it like this $header[]=get_header('email','pass '); $header[]=get_header('email','pass '); $header[]=get_header('email','pass '); $header[]=get_header('email','pass '); $header[]=get_header('email','pass Why is it putting '); on a new line? I need it to be right behind the password so it looks like this $header[]=get_header('email','pass'); $header[]=get_header('email','pass'); $header[]=get_header('email','pass'); $header[]=get_header('email','pass'); $header[]=get_header('email','pass'); any ideas? Thanks Ok I have a file with my emails and passwords like this email:pass email:pass email:pass email:pass and so on.. Is it possible to make a script that will delete everything after the ":" and replace the ":" with a comma? Im not sure what functions or w/e I could use to make this possible? Any ideas? Thanks Hello people, well the question couldn't be more explicit. I just learned how to view the php.ini configuration of my server using the phpinfo()script. But apparently it is a read only file. So how does one edit it? I am trying to extend session timeout. Thanks. Hi guys, I'm trying to edit a .conf file with php... I've tried using the parse_ini_file function to read it, but it fails at this point 1000 => 1234,a,b,,yes 2000 => 1234, ,,,no How can I edit this with php? For example changing "a" to "b", deleting a line, and adding a new line. Thanks guys i really appreciate the help from this forum!!! Let me apologize in advance for what may seem like a very stupid question for most of you. I am very new to php. I am simply trying to view/html in a .PHP file using Alleycode text editor. When I download the file from the server to my local PC, open the file in Alleycode, I cannot see the HTML. All that I see is the PHP code. Can someone provide me with instruction on how I might view then edit the HTML? Here is the code from Alleycode: <?php /*******************************************************************\ * CashbackEngine v1.1 * http://www.CashbackEngine.net * * Copyright (c) 2010 CashbackEngine Software. All rights reserved. * ------------ CashbackEngine IS NOT FREE SOFTWARE -------------- \*******************************************************************/ session_start(); require_once("inc/config.inc.php"); require_once("inc/pagination.inc.php"); $results_per_page = RESULTS_PER_PAGE; $cc = 0; function getCategory($category_id, $description = 0) { if (isset($category_id) && is_numeric($category_id) && $category_id != 0) { $query = "SELECT name, description FROM cashbackengine_categories WHERE category_id='".(int)$category_id."'"; $result = smart_mysql_query($query); if (mysql_num_rows($result) > 0) { $row = mysql_fetch_array($result); if ($description == 1) return $row['description']; else return $row['name']; }else { return "Category not found"; } } else { if ($description != 1) return "Retailers"; } } ////////////////// filter ////////////////////// if (isset($_GET['column']) && $_GET['column'] != "") { switch ($_GET['column']) { case "title": $rrorder = "title"; break; case "added": $rrorder = "added"; break; case "visits": $rrorder = "visits"; break; case "cashback": $rrorder = "cashback"; break; default: $rrorder = "title"; break; } } else { $rrorder = "title"; } if (isset($_GET['order']) && $_GET['order'] != "") { switch ($_GET['order']) { case "asc": $rorder = "asc"; break; case "desc": $rorder = "desc"; break; default: $rorder = "asc"; break; } } else { $rorder = "asc"; } ////////////////////////////////////////////////// if (isset($_GET['page']) && is_numeric($_GET['page']) && $_GET['page'] > 0) { $page = (int)$_GET['page']; } else { $page = 1; } $from = ($page-1)*$results_per_page; $where = ""; if (isset($_GET['cat']) && is_numeric($_GET['cat']) && $_GET['cat'] > 0) { $cat_id = (int)$_GET['cat']; unset($retailers_per_category); $retailers_per_category = array(); $retailers_per_category[] = "111111111111111111111"; $sql_retailers_per_category = smart_mysql_query("SELECT retailer_id FROM cashbackengine_retailer_to_category WHERE category_id='$cat_id'"); while ($row_retailers_per_category = mysql_fetch_array($sql_retailers_per_category)) { $retailers_per_category[] = $row_retailers_per_category['retailer_id']; } $where .= "retailer_id IN (".implode(",",$retailers_per_category).") AND"; } if (isset($_GET['letter']) && in_array($_GET['letter'], $alphabet)) { $ltr = mysql_real_escape_string(getGetParameter('letter')); if ($ltr == "0-9") { $where .= " title REGEXP '^[0-9]' AND"; }else{ $ltr = substr($ltr, 0, 1); $where .= " UPPER(title) LIKE '$ltr%' AND"; } } $where .= " status='active'"; if ($rrorder == "cashback") $query = "SELECT * FROM cashbackengine_retailers WHERE $where ORDER BY ABS(cashback) $rorder LIMIT $from, $results_per_page"; else $query = "SELECT * FROM cashbackengine_retailers WHERE $where ORDER BY $rrorder $rorder LIMIT $from, $results_per_page"; $total_result = smart_mysql_query("SELECT * FROM cashbackengine_retailers WHERE $where ORDER BY title ASC"); $total = mysql_num_rows($total_result); $result = smart_mysql_query($query); $total_on_page = mysql_num_rows($result); /////////////// Page config /////////////// $PAGE_TITLE = getCategory($_GET['cat']); require_once ("inc/header.inc.php"); ?> <h1><?php echo getCategory($_GET['cat']); ?></h1> <?php if ($total > 0) { ?> <p class="category_description"><?php echo getCategory($_GET['cat'], 1); ?></p> <div id="alphabet"> <ul> <li><a href="/retailers.php">All</a></li> <?php $numLetters = count($alphabet); $i = 0; foreach ($alphabet as $letter) { $i++; if ($i == $numLetters) $lilast = ' class="last"'; else $lilast = ''; if (isset($cat_id) && is_numeric($cat_id)) echo "<li".$lilast."><a href=\"/retailers.php?cat=$cat_id&letter=$letter\">$letter</a></li>"; else echo "<li".$lilast."><a href=\"/retailers.php?letter=$letter\">$letter</a></li>"; } ?> </ul> </div> <div class="browse_top"> <div class="sortby"> <form action="retailers.php" id="form1" name="form1" method="get"> <span>Sort by:</span> <select name="column" id="column" onChange="document.form1.submit()"> <option value="title" <?php if ($_GET['column'] == "title") echo "selected"; ?>>Name</option> <option value="visits" <?php if ($_GET['column'] == "visits") echo "selected"; ?>>Popular</option> <option value="added" <?php if ($_GET['column'] == "added") echo "selected"; ?>>Newest</option> <option value="cashback" <?php if ($_GET['column'] == "cashback") echo "selected"; ?>>Cashback</option> </select> <select name="order" id="order" onChange="document.form1.submit()"> <option value="desc"<?php if ($_GET['order'] == "desc") echo "selected"; ?>>Descending</option> <option value="asc" <?php if ($_GET['order'] == "asc") echo "selected"; ?>>Ascending</option> </select> <?php if ($cat_id) { ?><input type="hidden" name="cat" value="<?php echo $cat_id; ?>" /><?php } ?> <?php if ($ltr) { ?><input type="hidden" name="letter" value="<?php echo $ltr; ?>" /><?php } ?> <input type="hidden" name="page" value="<?php echo $page; ?>" /> </form> </div> <div class="results"> Showing <?php echo ($from + 1); ?> - <?php echo min($from + $total_on_page, $total); ?> of <?php echo $total; ?> </div> </div> <table align="center" width="100%" border="0" cellspacing="0" cellpadding="5"> <?php while ($row = mysql_fetch_array($result)) { $cc++; ?> <tr class="<?php if (($cc%2) == 0) echo "even"; else echo "odd"; ?>"> <td width="125" align="center" valign="middle"> <?php if ($row['featured'] == 1) { ?><span class="featured" alt="Featured Retailer" title="Featured Retailer"></span><?php } ?> <div id="shadow"><a href="/view_retailer.php?rid=<?php echo $row['retailer_id']; ?>"><img src="<?php if (!stristr($row['image'], 'http')) echo "/img/"; echo $row['image']; ?>" width="<?php echo IMAGE_WIDTH; ?>" height="<?php echo IMAGE_HEIGHT; ?>" alt="<?php echo $row['title']; ?>" title="<?php echo $row['title']; ?>" border="0" class="imgs" /></a></div> </td> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="3"> <tr> <td width="80%" align="left" valign="top"> <a class="retailer_title" href="/view_retailer.php?rid=<?php echo $row['retailer_id']; ?>"><?php echo $row['title']; ?></a> </td> <td nowrap="nowrap" width="20%" align="right" valign="top"> <span class="cashback"><?php echo DisplayCashback($row['cashback']); ?>X Points</span> </td> </tr> <tr> <td colspan="2" valign="middle" align="left"><p class="retailer_description"><?php echo $row['description']; ?> </p></td> </tr> <tr> <td valign="middle" align="left"> <?php if ($row['conditions'] != "") { ?> <div class="cashbackengine_tooltip"> <a class="conditions" href="#">Conditions</a> <span class="tooltip"><?php echo $row['conditions']; ?></span> </div> <?php } ?> <a class="favorites" href="#" onclick="if (confirm('Are you sure you want to add this retailer to your favorites?') )location.href='/myfavorites.php?act=add&rid=<?php echo $row['retailer_id']; ?>'">Add to Favorites</a> </td> <td valign="middle" align="right"> <a class="go2store" href="/go2store.php?id=<?php echo $row['retailer_id']; ?>" target="_blank">Go to Store</a> </td> </tr> </table> </td> </tr> <?php } ?> <tr> <td valign="middle" align="center" colspan="2"> <?php $params = ""; if (isset($cat_id) && $cat_id > 0) { $params = "cat=$cat_id&"; } if (isset($ltr) && $ltr != "") { $params = "letter=$ltr&"; } echo ShowPagination("retailers",$results_per_page,"retailers.php?".$params."column=$rrorder&order=$rorder&","WHERE ".$where); ?> </td> </tr> </table> <?php }else{ ?> <p align="center">There are no stores to list in this category!<br/><br/><a class="goback" href="#" onclick="history.go(-1);return false;">Go Back</a></p> <?php } ?> <?php require_once ("inc/footer.inc.php"); ?> Here is the code from the browser (View Source) <!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>Retailers | Bonus.me</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <link rel="stylesheet" type="text/css" href="/css/style.css" /> <script type="text/javascript" src="/js/jquery-1.4.2.min.js"></script> <script type="text/javascript" src="/js/jquery.autocomplete.js"></script> <script type="text/javascript" src="/js/cashbackengine.js"></script> <link rel="shortcut icon" href="/favicon.ico" /> <link rel="icon" type="image/ico" href="/favicon.ico" /> </head> <body> <div id="container"> <div id="header"> <div id="logo"><a href="http://www.bonus.me/"><img src="/images/LogoSiteFinal.png" alt="Bonus.me" title="Bonus.me" border="0" /></a></div> <div id="links"> <a href="/login.php">Log In</a> | <a href="/register.php">Sign Up</a> </div> <div id="searchbox"> <form action="search.php" method="get" id="searchfrm" name="searchfrm"> <input type="text" id="searchtext" name="searchtext" class="search_inputt" value="Search for stores..." onclick="if (this.defaultValue==this.value) this.value=''" onkeydown="this.style.color='#000000'" onblur="if (this.value=='') this.value=this.defaultValue" /> <input type="hidden" name="action" value="search" /> <input type="submit" class="search_button" value="" /> </form> </div> </div> <div id="menu"> <a href="/">Home</a> <a href="/retailers.php">Online Shopping</a> <a href="/instore.php">In Store Shopping</a> <a href="/myaccount.php">My Account</a> <a href="/withdraw.php">My Rewards</a> <a href="/invite.php">Get More</a> <a href="/benny.php">Benny</a> </div> <div id="column_left"> <div class="box"> <div class="top">Member Login</div> <div class="middle"> <form action="login.php" method="post"> Email Address:<br/> <input type="text" class="inputt" name="username" value="" size="22" /> Password:<br/> <input type="password" class="inputt" name="password" value="" size="22" /> <input type="hidden" name="action" value="login" /> <input type="submit" class="butt" style="margin-top: 2px;" name="login" id="login" value="Login" /> <br/><br/><a href="/forgot.php">Forgot your password?</a> <br/><br/>Not a Member? <a href="/register.php">Sign Up!</a> </form> </div> <div class="bottom"> </div> </div> <div class="box"> <div class="top">Shop by Category</div> <div class="middle"> <ul id="categories"> <li><a href="/retailers.php">All Stores</a></li> <ul style='padding-left:0px;margin:0;'><li><a href="/retailers.php?cat=41">Art, Music & Photo</a></li></ul><ul style='padding-left:0px;margin:0;'><li><a href="/retailers.php?cat=40">Automotive</a></li></ul><ul style='padding-left:0px;margin:0;'><li><a href="/retailers.php?cat=1">Books & Magazines</a></li></ul><ul style='padding-left:0px;margin:0;'><li><a href="/retailers.php?cat=38">Department & Discount</a></li></ul><ul style='padding-left:0px;margin:0;'><li><a href="/retailers.php?cat=6">Education</a></li></ul><ul style='padding-left:0px;margin:0;'><li><a href="/retailers.php?cat=7">Electronics & Computers</a></li></ul><ul style='padding-left:0px;margin:0;'><li><a href="/retailers.php?cat=2">Fashion & Apparel</a></li></ul><ul style='padding-left:10px;margin:0;'><li><a href="/retailers.php?cat=36">Children's Fashion</a></li></ul><ul style='padding-left:10px;margin:0;'><li><a href="/retailers.php?cat=35">Men's Fashions</a></li></ul><ul style='padding-left:10px;margin:0;'><li><a href="/retailers.php?cat=42">Shoes</a></li></ul><ul style='padding-left:10px;margin:0;'><li><a href="/retailers.php?cat=34">Women's Fashion</a></li></ul><ul style='padding-left:0px;margin:0;'><li><a href="/retailers.php?cat=9">Flowers</a></li></ul><ul style='padding-left:0px;margin:0;'><li><a href="/retailers.php?cat=10">Food & Drink</a></li></ul><ul style='padding-left:0px;margin:0;'><li><a href="/retailers.php?cat=12">Gifts & Party</a></li></ul><ul style='padding-left:0px;margin:0;'><li><a href="/retailers.php?cat=13">Health & Beauty</a></li></ul><ul style='padding-left:0px;margin:0;'><li><a href="/retailers.php?cat=14">Home & Garden</a></li></ul><ul style='padding-left:0px;margin:0;'><li><a href="/retailers.php?cat=16">Jewelry</a></li></ul><ul style='padding-left:0px;margin:0;'><li><a href="/retailers.php?cat=17">Mobile Phones & Accesories</a></li></ul><ul style='padding-left:0px;margin:0;'><li><a href="/retailers.php?cat=19">Office</a></li></ul><ul style='padding-left:0px;margin:0;'><li><a href="/retailers.php?cat=22">Pets</a></li></ul><ul style='padding-left:0px;margin:0;'><li><a href="/retailers.php?cat=39">Recreation & Leisure</a></li></ul><ul style='padding-left:0px;margin:0;'><li><a href="/retailers.php?cat=15">Software</a></li></ul><ul style='padding-left:0px;margin:0;'><li><a href="/retailers.php?cat=23">Sports & Fitness</a></li></ul><ul style='padding-left:0px;margin:0;'><li><a href="/retailers.php?cat=24">Toys & Games</a></li></ul><ul style='padding-left:0px;margin:0;'><li><a href="/retailers.php?cat=37">Travel</a></li></ul> </ul> </div> <div class="bottom"> </div> </div> </div> <div id="column_center"> <h1>Retailers</h1> <p class="category_description"></p> <div id="alphabet"> <ul> <li><a href="/retailers.php">All</a></li> <li><a href="/retailers.php?letter=0-9">0-9</a></li><li><a href="/retailers.php?letter=A">A</a></li><li><a href="/retailers.php?letter=B">B</a></li><li><a href="/retailers.php?letter=C">C</a></li><li><a href="/retailers.php?letter=D">D</a></li><li><a href="/retailers.php?letter=E">E</a></li><li><a href="/retailers.php?letter=F">F</a></li><li><a href="/retailers.php?letter=G">G</a></li><li><a href="/retailers.php?letter=H">H</a></li><li><a href="/retailers.php?letter=I">I</a></li><li><a href="/retailers.php?letter=J">J</a></li><li><a href="/retailers.php?letter=K">K</a></li><li><a href="/retailers.php?letter=L">L</a></li><li><a href="/retailers.php?letter=M">M</a></li><li><a href="/retailers.php?letter=N">N</a></li><li><a href="/retailers.php?letter=O">O</a></li><li><a href="/retailers.php?letter=P">P</a></li><li><a href="/retailers.php?letter=Q">Q</a></li><li><a href="/retailers.php?letter=R">R</a></li><li><a href="/retailers.php?letter=S">S</a></li><li><a href="/retailers.php?letter=T">T</a></li><li><a href="/retailers.php?letter=U">U</a></li><li><a href="/retailers.php?letter=V">V</a></li><li><a href="/retailers.php?letter=W">W</a></li><li><a href="/retailers.php?letter=X">X</a></li><li><a href="/retailers.php?letter=Y">Y</a></li><li class="last"><a href="/retailers.php?letter=Z">Z</a></li> </ul> </div> <div class="browse_top"> <div class="sortby"> <form action="retailers.php" id="form1" name="form1" method="get"> <span>Sort by:</span> <select name="column" id="column" onChange="document.form1.submit()"> <option value="title" >Name</option> <option value="visits" >Popular</option> <option value="added" >Newest</option> <option value="cashback" >Cashback</option> </select> <select name="order" id="order" onChange="document.form1.submit()"> <option value="desc">Descending</option> <option value="asc" >Ascending</option> </select> <input type="hidden" name="page" value="1" /> </form> </div> <div class="results"> Showing 1 - 2 of 2 </div> </div> <table align="center" width="100%" border="0" cellspacing="0" cellpadding="5"> <tr class="odd"> <td width="125" align="center" valign="middle"> <div id="shadow"><a href="/view_retailer.php?rid=13"><img src="<a href="http://click.linksynergy.com/fs-bin/click?id=8jghEyj/xMI&offerid=226353.10000004&subid=0&type=4"><IMG border="0" alt="Fanzz General Banner 120x90" src="http://ad.linksynergy.com/fs-bin/show?id=8jghEyj/xMI&bids=226353.10000004&subid=0&type=4&gri" width="120" height="60" alt="Fanzz.com" title="Fanzz.com" border="0" class="imgs" /></a></div> </td> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="3"> <tr> <td width="80%" align="left" valign="top"> <a class="retailer_title" href="/view_retailer.php?rid=13">Fanzz.com</a> </td> <td nowrap="nowrap" width="20%" align="right" valign="top"> <span class="cashback">7X Points</span> </td> </tr> <tr> <td colspan="2" valign="middle" align="left"><p class="retailer_description">Fanzz.com sells licensed sports apparel and gifts from the NFL, NBA, MLB, NCAA, NHL, MLS, NASCAR and WNBA. We have dozens of top brands on our site including Nike, Adidas, Reebok, New Era, Antigua, Baseline, Fathead, Fanmats, Majestic, Mitchell and Ness, Under Armour, Wilson, Wincraft and many more. </p></td> </tr> <tr> <td valign="middle" align="left"> <a class="favorites" href="#" onclick="if (confirm('Are you sure you want to add this retailer to your favorites?') )location.href='/myfavorites.php?act=add&rid=13'">Add to Favorites</a> </td> <td valign="middle" align="right"> <a class="go2store" href="/go2store.php?id=13" target="_blank">Go to Store</a> </td> </tr> </table> </td> </tr> <tr class="even"> <td width="125" align="center" valign="middle"> <div id="shadow"><a href="/view_retailer.php?rid=14"><img src="http://www.ftjcfx.com/image-5471697-10807939" width="120" height="60" alt="Pets Warehouse" title="Pets Warehouse" border="0" class="imgs" /></a></div> </td> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="3"> <tr> <td width="80%" align="left" valign="top"> <a class="retailer_title" href="/view_retailer.php?rid=14">Pets Warehouse</a> </td> <td nowrap="nowrap" width="20%" align="right" valign="top"> <span class="cashback">9X Points</span> </td> </tr> <tr> <td colspan="2" valign="middle" align="left"><p class="retailer_description">Founded in 1974 Pets Warehouse® provides the broadest selection of pet supplies available anywhere online, add value to your site and benefit your customers with low prices. </p></td> </tr> <tr> <td valign="middle" align="left"> <a class="favorites" href="#" onclick="if (confirm('Are you sure you want to add this retailer to your favorites?') )location.href='/myfavorites.php?act=add&rid=14'">Add to Favorites</a> </td> <td valign="middle" align="right"> <a class="go2store" href="/go2store.php?id=14" target="_blank">Go to Store</a> </td> </tr> </table> </td> </tr> <tr> <td valign="middle" align="center" colspan="2"> </td> </tr> </table> </div> <div id="column_right"> <div class="center"> <p align="center"> <a href="/invite.php"><img src="/images/ReferAFriend.gif" border="0"></a></br> <a href="/invite.php">Refer A Friend<br/>And Get More!</a> </p> </div> </div> <div id="footer"> <a href="/terms.php">Terms & Conditions</a> · <a href="/contact.php">Contact Us</a> · <a href="/help.php">FAQs</a> <p>© December, 2011. Bonus.Me. All rights reserved.</p> </div> </div> </body> </html> $results_per_page = RESULTS_PER_PAGE; $cc = 0; function getCategory($category_id, $description = 0) { if (isset($category_id) && is_numeric($category_id) && $category_id != 0) { $query = "SELECT name, description FROM cashbackengine_categories WHERE category_id='".(int)$category_id."'"; $result = smart_mysql_query($query); if (mysql_num_rows($result) > 0) { $row = mysql_fetch_array($result); if ($description == 1) return $row['description']; else return $row['name']; }else { return "Category not found"; } } else { if ($description != 1) return "Retailers"; } } ////////////////// filter ////////////////////// if (isset($_GET['column']) && $_GET['column'] != "") { switch ($_GET['column']) { case "title": $rrorder = "title"; break; case "added": $rrorder = "added"; break; case "visits": $rrorder = "visits"; break; case "cashback": $rrorder = "cashback"; break; default: $rrorder = "title"; break; } } else { $rrorder = "title"; } if (isset($_GET['order']) && $_GET['order'] != "") { switch ($_GET['order']) { case "asc": $rorder = "asc"; break; case "desc": $rorder = "desc"; break; default: $rorder = "asc"; break; } } else { $rorder = "asc"; } ////////////////////////////////////////////////// if (isset($_GET['page']) && is_numeric($_GET['page']) && $_GET['page'] > 0) { $page = (int)$_GET['page']; } else { $page = 1; } $from = ($page-1)*$results_per_page; $where = ""; if (isset($_GET['cat']) && is_numeric($_GET['cat']) && $_GET['cat'] > 0) { $cat_id = (int)$_GET['cat']; unset($retailers_per_category); $retailers_per_category = array(); $retailers_per_category[] = "111111111111111111111"; $sql_retailers_per_category = smart_mysql_query("SELECT retailer_id FROM cashbackengine_retailer_to_category WHERE category_id='$cat_id'"); while ($row_retailers_per_category = mysql_fetch_array($sql_retailers_per_category)) { $retailers_per_category[] = $row_retailers_per_category['retailer_id']; } $where .= "retailer_id IN (".implode(",",$retailers_per_category).") AND"; } if (isset($_GET['letter']) && in_array($_GET['letter'], $alphabet)) { $ltr = mysql_real_escape_string(getGetParameter('letter')); if ($ltr == "0-9") { $where .= " title REGEXP '^[0-9]' AND"; }else{ $ltr = substr($ltr, 0, 1); $where .= " UPPER(title) LIKE '$ltr%' AND"; } } $where .= " status='active'"; if ($rrorder == "cashback") $query = "SELECT * FROM cashbackengine_retailers WHERE $where ORDER BY ABS(cashback) $rorder LIMIT $from, $results_per_page"; else $query = "SELECT * FROM cashbackengine_retailers WHERE $where ORDER BY $rrorder $rorder LIMIT $from, $results_per_page"; $total_result = smart_mysql_query("SELECT * FROM cashbackengine_retailers WHERE $where ORDER BY title ASC"); $total = mysql_num_rows($total_result); $result = smart_mysql_query($query); $total_on_page = mysql_num_rows($result); /////////////// Page config /////////////// $PAGE_TITLE = getCategory($_GET['cat']); require_once ("inc/header.inc.php"); ?> <h1><?php echo getCategory($_GET['cat']); ?></h1> <?php if ($total > 0) { ?> <p class="category_description"><?php echo getCategory($_GET['cat'], 1); ?></p> <div id="alphabet"> <ul> <li><a href="/retailers.php">All</a></li> <?php $numLetters = count($alphabet); $i = 0; foreach ($alphabet as $letter) { $i++; if ($i == $numLetters) $lilast = ' class="last"'; else $lilast = ''; if (isset($cat_id) && is_numeric($cat_id)) echo "<li".$lilast."><a href=\"/retailers.php?cat=$cat_id&letter=$letter\">$letter</a></li>"; else echo "<li".$lilast."><a href=\"/retailers.php?letter=$letter\">$letter</a></li>"; } ?> </ul> </div> <div class="browse_top"> <div class="sortby"> <form action="retailers.php" id="form1" name="form1" method="get"> <span>Sort by:</span> <select name="column" id="column" onChange="document.form1.submit()"> <option value="title" <?php if ($_GET['column'] == "title") echo "selected"; ?>>Name</option> <option value="visits" <?php if ($_GET['column'] == "visits") echo "selected"; ?>>Popular</option> <option value="added" <?php if ($_GET['column'] == "added") echo "selected"; ?>>Newest</option> <option value="cashback" <?php if ($_GET['column'] == "cashback") echo "selected"; ?>>Cashback</option> </select> <select name="order" id="order" onChange="document.form1.submit()"> <option value="desc"<?php if ($_GET['order'] == "desc") echo "selected"; ?>>Descending</option> <option value="asc" <?php if ($_GET['order'] == "asc") echo "selected"; ?>>Ascending</option> </select> <?php if ($cat_id) { ?><input type="hidden" name="cat" value="<?php echo $cat_id; ?>" /><?php } ?> <?php if ($ltr) { ?><input type="hidden" name="letter" value="<?php echo $ltr; ?>" /><?php } ?> <input type="hidden" name="page" value="<?php echo $page; ?>" /> </form> </div> <div class="results"> Showing <?php echo ($from + 1); ?> - <?php echo min($from + $total_on_page, $total); ?> of <?php echo $total; ?> </div> </div> <table align="center" width="100%" border="0" cellspacing="0" cellpadding="5"> <?php while ($row = mysql_fetch_array($result)) { $cc++; ?> <tr class="<?php if (($cc%2) == 0) echo "even"; else echo "odd"; ?>"> <td width="125" align="center" valign="middle"> <?php if ($row['featured'] == 1) { ?><span class="featured" alt="Featured Retailer" title="Featured Retailer"></span><?php } ?> <div id="shadow"><a href="/view_retailer.php?rid=<?php echo $row['retailer_id']; ?>"><img src="<?php if (!stristr($row['image'], 'http')) echo "/img/"; echo $row['image']; ?>" width="<?php echo IMAGE_WIDTH; ?>" height="<?php echo IMAGE_HEIGHT; ?>" alt="<?php echo $row['title']; ?>" title="<?php echo $row['title']; ?>" border="0" class="imgs" /></a></div> </td> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="3"> <tr> <td width="80%" align="left" valign="top"> <a class="retailer_title" href="/view_retailer.php?rid=<?php echo $row['retailer_id']; ?>"><?php echo $row['title']; ?></a> </td> <td nowrap="nowrap" width="20%" align="right" valign="top"> <span class="cashback"><?php echo DisplayCashback($row['cashback']); ?>X Points</span> </td> </tr> <tr> <td colspan="2" valign="middle" align="left"><p class="retailer_description"><?php echo $row['description']; ?> </p></td> </tr> <tr> <td valign="middle" align="left"> <?php if ($row['conditions'] != "") { ?> <div class="cashbackengine_tooltip"> <a class="conditions" href="#">Conditions</a> <span class="tooltip"><?php echo $row['conditions']; ?></span> </div> <?php } ?> <a class="favorites" href="#" onclick="if (confirm('Are you sure you want to add this retailer to your favorites?') )location.href='/myfavorites.php?act=add&rid=<?php echo $row['retailer_id']; ?>'">Add to Favorites</a> </td> <td valign="middle" align="right"> <a class="go2store" href="/go2store.php?id=<?php echo $row['retailer_id']; ?>" target="_blank">Go to Store</a> </td> </tr> </table> </td> </tr> <?php } ?> <tr> <td valign="middle" align="center" colspan="2"> <?php $params = ""; if (isset($cat_id) && $cat_id > 0) { $params = "cat=$cat_id&"; } if (isset($ltr) && $ltr != "") { $params = "letter=$ltr&"; } &nbs hey guys its me again. what i want is for me to be able to edit php using variables and post it as a new file. now to attchieve this i am simply copying the current template into the php file and telling it to grap what variables it needs. i have successfully done this with a .css file but when im doing it with a php file its erroring at <?php as the file is already in php. what i need to know is can i have the php file look at the <?php as just text to write to a file? my code is below Code: [Select] $dir = "../Header/"; $file = "" . $branchid . ".php"; $dir = "$dir"."$file"; touch($dir); $Handle = fopen($dir, 'w'); $Data = " <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <?php //We count the number of new messages the user has $nb_new_pm = mysql_fetch_array(mysql_query('select count(*) as nb_new_pm from pm where ((user1="'.$_SESSION['user_id'].'" and user1read="no") or (user2="'.$_SESSION['user_id'].'" and user2read="no")) and id2="1"')); //The number of new messages is in the variable $nb_new_pm $nb_new_pm = $nb_new_pm['nb_new_pm']; ?> <html xmlns="http://www.w3.org/1999/xhtml"> <style type="text/css"> /* Remove margins from the 'html' and 'body' tags, and ensure the page takes up full screen height */ html, body { margin:0; padding:0;} /* Set the position and dimensions of the background image. */ #page-background {position:fixed; top:0; left:0; width:100%; height:100%;} /* Specify the position and layering for the content that needs to appear in front of the background image. Must have a higher z-index value than the background image. Also add some padding to compensate for removing the margin from the 'html' and 'body' tags. */ #content {position:relative; z-index:1; padding:10px;} </style> <head> <title>Apollo - Data Management System</title> <!--Links--> <link rel="icon" type="image/ico" href="favicon.ico"></link> <link rel="stylesheet" media="all" type="text/css" href="/styles.css" /> </head> <body> <div id="Headerlogo"> <img src="/images/PaulKemp/PaulBanner.png" width="100%" alt="Smile"></div> <div class="wrapper1"> <div class="wrapper"> <div class="nav-wrapper"> <div class="nav"> <ul id="navigation"> <li class="active"> <a href="/Main/myaccount.php"> <span class="menu-left"></span> <span class="menu-mid">Main Menu</span> <span class="menu-right"></span> </a> </li> <li class=""> <a href="/PersonnelMessages/list_pm.php"> <span class="menu-left"></span> <span class="menu-mid"><b>Messages(<?php echo $nb_new_pm; ?> unread)</b></span> <span class="menu-right"></span> </a> <div class="sub"> <ul> <li> <a href="/PersonnelMessages/new_pm.php">New Personal Message</a> </li> </ul> <div class="btm-bg"></div> </div> </li> <?php if (checkMasterAdmin()) { ?> <li class=""> <a href="#"> <span class="menu-left"></span> <span class="menu-mid">Admin</span> <span class="menu-right"></span> </a> <div class="sub"> <ul> <li> <a href="/Admin/UploadServices.php">New KPI</a> </li> <li> <a href="/Admin/MonthReview.php">New Month Review</a> </li> <li> <a href="/Admin/CreateUser.php">New User</a> </li> <li> <a href="/Admin/EditUsers.php">Edit User</a> </li> <li> <a href="/Admin/HolidayRequests.php">Authorise Holidays</a> </li> <li> <a href="/Backup/BackupSite.php">Backup</a> </li> <li> <a href="/PersonnelMessages/CompanyAnnouncement.php">Company Announcements</a> </li> <li> <a href="/PersonnelMessages/DeleteAnnouncements.php">Delete Announcements</a> </li> </ul> <div class="btm-bg"></div> </div> </li> <?php } ?> <?php if (checkAdmin()) { ?> <li class=""> <a href="#"> <span class="menu-left"></span> <span class="menu-mid">Admin</span> <span class="menu-right"></span> </a> <div class="sub"> <ul> <li> <a href="/Admin/UploadServices.php">New KPI</a> </li> <li> <a href="/Admin//MonthReview.php">New Month Review</a> </li> <li> <a href="/Admin/CreateUser.php">New User</a> </li> <li> <a href="/Admin/EditUsers.php">Edit User</a> </li> <li> <a href="/Admin/HolidayRequests.php">Authorise Holidays</a> </li> <li> <a href="/Backup/BackupSite.php">Backup</a> </li> <li> <a href="/PersonnelMessages/CompanyAnnouncement.php">Company Announcements</a> </li> <li> <a href="/PersonnelMessages/DeleteAnnouncements.php">Delete Announcements</a> </li> </ul> <div class="btm-bg"></div> </div> </li> <?php } ?> <?php if (checkBranchOwner()) { ?> <li class=""> <a href="#"> <span class="menu-left"></span> <span class="menu-mid">Admin</span> <span class="menu-right"></span> </a> <div class="sub"> <ul> <li> <a href="/Admin/UploadServices.php">New KPI</a> </li> <li> <a href="/Admin//MonthReview.php">New Month Review</a> </li> <li> <a href="/Admin/CreateUser.php">New User</a> </li> <li> <a href="/Admin/EditUsers.php">Edit User</a> </li> <li> <a href="/Admin/HolidayRequests.php">Authorise Holidays</a> </li> <li> <a href="/Backup/BackupSite.php">Backup</a> </li> <li> <a href="/PersonnelMessages/CompanyAnnouncement.php">Company Announcements</a> </li> <li> <a href="/PersonnelMessages/DeleteAnnouncements.php">Delete Announcements</a> </li> </ul> <div class="btm-bg"></div> </div> </li> <?php } ?> <li class=""> <a href="#"> <span class="menu-left"></span> <span class="menu-mid">Staff</span> <span class="menu-right"></span> </a> <div class="sub"> <ul> <li> <a href="/Staff/ChangePassword.php">Change Password</a> </li> <li> <a href="/Staff/mysettings.php">Change Details</a> </li> <li> <a href="/Staff/HolidaysLeft.php">Holidays Left</a> </li> <li> <a href="/Staff/profile.php">My Profile</a> </li> <li> <a href="/Staff/MyServices.php">My Services</a> </li> <li> <a href="/Viewmonthreports.php">Month Review</a> </li> </ul> <div class="btm-bg"></div> </div> </li> <li class=""> <a href="#"> <span class="menu-left"></span> <span class="menu-mid">Referrers</span> <span class="menu-right"></span> </a> <div class="sub"> <ul> <li> <a href="/Referrers/Newreferrers.php">New Referrers</a> </li> <li> <a href="/Referrers/SendReferrers.php">Send Referrers</a> </li> </ul> <div class="btm-bg"></div> </div> </li> <li class=""> <a href="#"> <span class="menu-left"></span> <span class="menu-mid">Holidays</span> <span class="menu-right"></span> </a> <div class="sub"> <ul> <li> <a href="/Holidays/RequestHoliday.php">Book Off Holiday</a> </li> <?php if (checkAdmin()) { ?> <li> <a href="/Admin/HolidayAmendments.php">Amend Holidays</a> </li> <li> <a href="/Admin/CancelledHolidays.php">Show Cancelled Holidays</a> </li> </li> <li> <a href="/reports/holidayreports.php">holiday report</a> </li> <?php } ?> <?php if (checkMasterAdmin()) { ?> <li> <a href="/Admin/HolidayAmendments.php">Amend Holidays</a> </li> <li> <a href="/Admin/CancelledHolidays.php">Show Cancelled Holidays</a> </li> <li> <a href="/reports/holidayreports.php">holiday report</a> </li> <?php } ?> </ul> <div class="btm-bg"></div> </div> </li> <li class=""> <a href="/logout.php"> <span class="menu-left"></span> <span class="menu-mid">Logout</span> <span class="menu-right"></span> </a> </li> </ul> </div> </div> </div> </div> <br /> "; fwrite($Handle, $Data); $Data = "Bilbo Jones\n"; fwrite($Handle, $Data); print "Data Written"; fclose($Handle); Can this be done easily enough with php? I've attached my current code below, but don't see how i could add this in. Code: [Select] $name = $_FILES['file']['name']; $temp = $_FILES['file']['tmp_name']; $size = $_FILES['file']['size']; $random = md5(uniqid(rand(), true)); $random = substr($random, 0, 20); if (!$name || !$temp || !$size) { echo "Go back and select a file."; exit(); } foreach ($_FILES as $file) { if ($file['tmp_name'] != null) { $thisext1=explode(".", strtolower($file['name'])); $thisext=$thisext1[count($thisext1)-1]; if (!in_array($thisext, $extensions)) { echo "That file type is not allowed."; exit(); } } } Hi, I've been googling for a while now for an example of how to read, edit and write a configuration file. This part was easy to find... <?php $icon_settings = parse_ini_file("test.desktop"); print_r($icon_settings); ?> ...the above code works great, but how do I edit and write back a configuration file like this... Code: [Select] #!/usr/bin/env xdg-open [Desktop Entry] Version=1.0 Name=Firefox Web Browser Comment=Browse the World Wide Web GenericName=Web Browser Exec=firefox %u Terminal=false X-MultipleArgs=false Type=Application Icon=firefox # ... and so on back to the drive? Thanks. I want to add text to a file, getting it printed out in index.php and later want to edit/delete per row. I give codes page wise. first the form to take data: add.php: Code: [Select] <?php ?> <form method="post" action="add_data.php"> <fieldset> <legend>Student List</legend> Name : <input type="text" name="uname" /><br> Content : <input type="text" name="age" /> <br> <input type="submit" name="submit" value="send" /> </fieldset> </form> Next adding text to a file: add_data.php: Code: [Select] <?php $id = 1; if (file_exists("data.txt")) { $fp = fopen("data.txt", 'r'); $str = fread($fp, filesize("data.txt")); $str_arr = explode("|", $str); foreach ($str_arr as $rec) { if ($rec) { $id++; } } } $mode = (file_exists("data.txt"))? "a" : "w"; $fp = fopen("data.txt", $mode); $line = $id . "--" . $_POST['uname'] . "--" . $_POST['age'] . "|"; $res = fwrite($fp, $line); fclose($fp); header("location:index.php"); ?>In the index.php, I'd like to fetch data and edit them per row: Code: [Select] <?php $fp = fopen("data.txt", 'r'); $str = fread($fp, filesize("data.txt")); $str_arr = explode("|", $str); echo "<table border='1'>"; echo "<tr><td>ID</td><td>Name</td><td>Age</td><td>Option</td></tr>"; foreach ($str_arr as $rec) { if ($rec) { $rec_arr = explode("--", $rec); echo "<tr>"; foreach ($rec_arr as $col) { echo "<td>$col</td>"; } print "<td><a href=\"edit.php?id=$id\">Edit</a>/<a href=\"delete.php?id=$id\">Delete</a></td></tr>"; } } echo "</table>"; echo "<a href=\"add.php\">Add Data</a>"; ?> Next I want to Edit per row: edit.php: Code: [Select] <?php $fp = fopen("data.txt", 'r'); $str = fread($fp, filesize("data.txt")); $str_arr = explode("|", $str); foreach ($str_arr as $rec) { if ($rec) { $rec_arr = explode("--", $rec); $id = $rec_arr[0]; $name = $rec_arr[1]; $age = $rec_arr[2]; if ($id == $_REQUEST["id"]) { echo "<form action='edit_data.php' method='post'>"; echo "Name :<input type='text' name='uname' value='$name' /><br>"; echo "Age: <input type='text' name='age' value=$age /><br>"; echo "<input type='hidden' name='uid' value=$id />"; echo "<input type='submit' value='Edit'>"; echo "</form>"; } } } ?> From edit.php to edit_data.php where I practically try to edit per row: Code: [Select] <?php $fp = fopen("data.txt", 'r'); $str = fread($fp, filesize("data.txt")); $str_arr = explode("|", $str); foreach ($str_arr as $rec) { if ($rec) { $rec_arr = explode("--", $rec); $id = $rec_arr[0]; $name = $rec_arr[1]; $age = $rec_arr[2]; if ($id == $_POST['uid']) { $new_str = $id . "--" . $_POST['uname'] . "--" . $_POST['age'] . "|"; } else { $new_str = $id . "--" . $name . "--" . $age . "|"; } } } fclose($fp); $fp = fopen("data.txt", 'w'); fwrite($fp, $new_str); fclose($fp); ?> The mechanism is simple. Taking datas from a form, explode them to an array and get them into col/row pattern to edit and delete them. But my problem is when I want to edit in index.php page, specially in this part: Code: [Select] print "<td><a href=\"edit.php?id=$id\">Edit</a> It says, undefined index. But I try to catch this $id in the edit.php page, in this manner, as you see in my code: Code: [Select] foreach ($str_arr as $rec) { if ($rec) { $rec_arr = explode("--", $rec); $id = $rec_arr[0]; $name = $rec_arr[1]; $age = $rec_arr[2]; if ($id == $_REQUEST["id"]) { echo "<form action='edit_data.php' method='post'>"; echo "Name :<input type='text' name='uname' value='$name' /><br>"; echo "Age: <input type='text' name='age' value=$age /><br>"; echo "<input type='hidden' name='uid' value=$id />"; echo "<input type='submit' value='Edit'>"; echo "</form>"; } } } Have I done any mistake here? If anyone points out, I'll be obliged. Hi all, I am in need of php code for word file conversion. That is to convert word .docx file to .doc file Someone please provide me with a solution. Thanks. for example, i want to search for an the string "example@example.com" and erase it. thanks in advance ! Hai..
currently i am developing client dashboard using php/mysql.Here is my problem i need to create a tab named as notes.Using this tab the logged in users can add a new note or edit his existing note and save as text file.. This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=345742.0 I'm pretty sure this is really simple to do using the count function, but I am having a hard time finding examples on how to count the number of times a "SPECIFIC" word occurs in a file. For example, I just want to display how many times "this-word" occurs in "http://www.mysite.com/logfile.log". Any help would be appreciated. I have been learning and practicing PHP and mySQL on a laptop that I have a server set up on. My PHP index file accesses the database using the mysqli_connect('localhost', 'root', 'mypassword'); When I upload these files to my web host I put the files in the public directory so that they are accessable on the internet. My worry is that some type of web scraper utility can download the php file and read my login name and password. Are PHP files somehow protected from being downloaded in some type of scraper utility even though they are in a public folder or should I put it in another folder? Hi,
I've got a "data.txt" file with the following content:
One1:One2:One3:One4:One5:One6 Two1:Two2:Two3:Two4:Two5:Two6 Three1:Three2:Three3:Three4:Three5:Three6Now I want to be able to take each data and put on a specific location of a htlm code. Each line for its own. So for the first line, it should look something like this: <html> <head> <title></title> <head> <body> <h1>One2</h1> <h2>One4 some other Text One5</h2> <img src="One6.jpg"> </body> </html>Unforturtunately I don't have a clue how to do that. Can anybody help me out or does someone know a good and easy tutorial? Thanks a lot Hi, I'm designing a website for an online radio station. One show a week they have a DJ who has his own top 40 show with HIS top 40 listed on his own site At the moment, the only solution I have to getting the top 40 onto my clients site is an iframe (not good I know!) However, what's worse is that this top 40 list has horrendous colours that completely break the theme of my clients site and worse still, is Excel generated HTML! The author of this list is not a client of mine, and so, I can't do anything to persuade him to change. I've attached a copy of the offending file so you can see what I'm working with, changed the extension from html to txt for the forum post. Just for clarification, the excel generated HTML file is not hosted on my server (although I could set up a cron job to get it if required) I've done some digging and found a useful bit of code However, it displays the table 4 or 5 times In addition to this, is there a way to manipulate the width of the columns with this code? Code: [Select] <?php $oldSetting = libxml_use_internal_errors( true ); libxml_clear_errors(); $html = new DOMDocument(); $html->loadHtmlFile('Chart%20Table2.htm'); $xpath = new DOMXPath( $html ); $elements = $xpath->query( "//table" ); foreach ( $elements as $item ) { $newDom = new DOMDocument; $newDom->appendChild($newDom->importNode($item,true)); $xpath = new DOMXPath( $newDom ); foreach ($item->attributes as $attribute) { for ($node = $item->firstChild; $node !== NULL; $node = $node->nextSibling) { if (($attribute->nodeName =='valign') && ($attribute->nodeValue=='top')) { print($node->nodeValue); } else { print("<br>".$node->nodeValue); } } print("<br>"); } } libxml_clear_errors(); libxml_use_internal_errors( $oldSetting ); ?> Basically, I just want the table, I'm not bothered about the first column that contains some pictures as I think that's a separate table Ideally, I'd like to apply my own formatting to the table too (padding etc) if that is possible (eg from line 897 <td class=xl28 x:num>1</td>) down to line 1433 The trouble is, there is a lot of custom widths and styles inbetween which I don't want I'd like all the tr and td's without all the associated guff from the original export from Excel Geez I wish there was an easy way to get this guy just to export as CSV but unfortunately that's not an option! Many thanks in advance! |