Hi peeps, I have asked broadly the same question in the thread below, but nobody has answered... perhaps I was too vague Anyway - Im adapting a ready made script for my site www.onofood.com # If you click the menu's down the right hand side it takes you to all fields of that category. If you click on individual fields therein it takes you to an individual page. Now here's the question: the pagename is 001.html for example, and I wish to change that for the title of the record (record_title.html for example) would I do this in the PHP? should I copy one field over the other in the SQL data? if thats the case what program would you recommend? any help would be gratefully receiveid, thanks, MOG
If the field is used in only one table, yes, you can update that field. Points to watch: 1) The field size should be large enough to accommodate the largest data. 2) Donot use Spaces in names .e.g. Change "Baked Cheese Garlic Grits" to "bakedcheesegarlicgrits". You could use "-" or underscore in place of space. 3) URLs are case-sensitive. You can use phpmyadmin to update your database.
thanks for the prod in the right direction, I greatly appreciate it! I managed after playing about with phpmysql to create a new table and replaced the recipe title column with the id column, and re-imported it succesefully. All went well, the catergories stayed, the menu "snapshots" worked fine, and the links were updated as I wanted them (with GREAT seo sensitive links), BUT when you clicked on one you got a 404 error. I have restored the old database now so that the website still works - does anyone have any idea what I could be doing wrong? the code on the record display template is: <?php $id=$_GET[id]; include "conn.php"; $query = "SELECT * FROM recipes WHERE id = '$id'"; $result = mysql_query($query,$db) or die("Error: " . mysql_error()); $myrow = mysql_fetch_array($result); $category=$myrow[title]; $disp = "<center><font size=3 face='Century Gothic' color='navy'>$myrow[title]</font></center><img src='$siteurl/recipes.jpg' align='right'> <font face='Century Gothic' size=2 color='#000000'>You'll Need: <p>" .nl2br($myrow[incredients]). "<p> <font color='#000000' face='Century Gothic'>Procedures :<br>$myrow[procedures]<br>Category : <a href='$url/categorize.php?category=$myrow[category]'> $myrow[category]</a></font>"; $pagetitle="$myrow[title]"; include "template.php"; ?> -------------------------- Would it help if I re-uploaded the affected db with the pagenames that I actually want into a new directory for anyone to take a look at? thanks! MOG