kylegetson 16 Junior Poster in Training

you can use the apache directory directive. but it will probably effect how you can access it via flash.

http://httpd.apache.org/docs/1.3/mod/core.html#directory

kylegetson 16 Junior Poster in Training

You could leave it as an html file, and make your html files parsable as php files (with addhandler in your .htaccess)

I would stay away form iframes wherever possible.

kylegetson 16 Junior Poster in Training

the .htaccess file won't be read by apache outside the document root. if your just trying to restrict access, you could use authentication, not sure if you could get flash to work with that though.

generally, you put something outside the document root that you don't want the web to have access to, but it seems like you want it to be web accessible?

kylegetson 16 Junior Poster in Training

doc root missing?

kylegetson 16 Junior Poster in Training

can you post the virtual host from your conf file?

kylegetson 16 Junior Poster in Training

yes, just append the ID to the url as your building your links. If your using something like wordpress (and maybe other blog/cms systems) there are functions for this. Wordpress has a function add_query_args() that allows you to easily append/remove things from the URL.

kylegetson 16 Junior Poster in Training

Assuming you use the URL
http://www.mywebsite.com/myfile.php?ID=5

$ID = $_GET['ID']; // this would have 5 as a string, that could actually be anything (like SQL to inject)
$ID = intval($_GET['ID']); // this would have 5 (as a int) you could use this in a query without worry of injection (though the number could be different than you expect)

You could also use encoding, like base64_encode() and base64_decode() to put variables on the URL. Hope that helps.

kylegetson 16 Junior Poster in Training

relying on the URL and $_GET variables can leave you vulnerable. It can be safe, when done correctly. The most important thing, is you need to verify the data, before you try to do something with it. Specifically when adding/modifying/deleting things from a database, be sure the person should be able to perform that action.

I would try to keep it to a minimum, but passing an ID or something isnt bad... just make sure its a (valid) number.

kylegetson 16 Junior Poster in Training

If you put the pictures into an list <li> it would be easier to keep updated. You could style them to show 5 pictures per row. Then later, if you need 3 pictures per row, you can just adjust your css, rather than your entire table structure.

But if you want to do tables, heres some code that may get you started:

//$img[row][column]

$img[0][0] = "img1.jpg";
$img[0][1] = "img2.jpg";
$img[0][2] = "img3.jpg";
$img[0][3] = "img4.jpg";
$img[0][4] = "img5.jpg";

$img[1][0] = "img6.jpg";
$img[1][1] = "img7.jpg";
$img[1][2] = "img8.jpg";
$img[1][3] = "img9.jpg";
$img[1][4] = "img0.jpg";
echo "<table>";
foreach($img as $row){
	echo "<tr>\n";
	foreach($row as $col){
		echo "<td>";
		echo $col;
		echo "</td>\n";
	}
	echo "</tr>\n";
}
echo "</table>";
kylegetson 16 Junior Poster in Training

yea, I think using <?php instead of just <? to open php tags may help.

You should check the mime types that your server is using. I think you need to be sure php files are set up as application/x-httpd-php. You can do this in your mime.types file in apache, or an .htaccess file.

kylegetson 16 Junior Poster in Training

I cant say that I've ever worked with a space in a column name... but I would assume you could use the little tick marks around the name of the field.

$sql = "UPDATE Lieneke SET `Best moment` = REPLACE(`Best moment`,'$moment','$momentnew')";

If your using a tool like phpMyAdmin, you could do the update by simply editing the row and seeing how it formats the update statement.

kylegetson 16 Junior Poster in Training

You can also do this via css and ajax. I do it this way, so i can create a few simple classes for my cursors, and then just use addClass or removeClass whenever an event occurs that I need to change the cursor (click, hover, alert, etc.)

kylegetson 16 Junior Poster in Training

It sounds like your server is not parsing php files. What type of server is this running on?

kylegetson 16 Junior Poster in Training

your php code is not visible in the source of a page. only your output from a php file is visible in the source. now, if someone had access to your files themselves, through a command line, or FTP or something like that, they could read the file, and see that type information.

kylegetson 16 Junior Poster in Training

Looks to me like you've got WHERE in there twice. An SQL statement should only have 1. (unless your using join, subqueries, etc.)

I havent tested this but try:

UPDATE `isc_products` WHERE `prodcostprice` >= 0 AND `prodcostprice` <= 1000 SET `prodprice` = (`prodcostprice` * 1.20);

notice, I removed your 2nd WHERE. hope that helps.

kylegetson 16 Junior Poster in Training

Thanks alot. Im going to check them right now. However, How easily do they integrate with custom site (Hand coded and not CMS)?

extremely easy. there is example code on that site. But its very simple. You'll be able to replace a typical text input with their section of code.

kylegetson 16 Junior Poster in Training

I think what your asking for is a WYSIWYG editor. (What You See Is What You Get). The one Wordpress uses is called TinyMCE. It is javascript based, not PHP, but most of the editors are javascript, or are active X objects. TinyMCE's implementation is very easy, and there are alot of examples.
tinymce.moxiecode.com
Also, there is one called FCK Editor. Its also easy. www.fckeditor.com/

Both are open source, and easy to impliment. Hope thats what you were looking for.

kylegetson 16 Junior Poster in Training

yea, definately a cron job would be your best bet. If youre hosting on a cPanel server, you can do this without going to the command line. If not, and you'll either need to get your host to set up the job for you, or if you have ssh, you can create the cron job yourself.

kylegetson 16 Junior Poster in Training

Are you using a database management tool of some kind? Like phpMyAdmin? If so, test the query there, it'll give you more specific error messages. I usually label my queries tables by letter, to avoid confusion, because if your tables have field names the same, you could run into problems.

SELECT A.col1, B.col2, C.col3 FROM table1 as A, tabe2 as B, table3 as C

hope that helps.