Hi
Me again - sorry.
I've written a image file uploader in php and I'm wondering if I can integrate this within mydbr.
At present I have the following which calls the php file:
select 'dbr.html',
'<head>
<title>A web page that points a browser to a different page after 2 seconds</title>
<meta http-equiv="refresh" content="2; URL=http://xxx.xxx.com/mydbr/user/image_uploader_test.php">
<meta name="keywords" content="automatic redirection">
</head>
<body>
If your browser doesn\'t automatically go there within a few seconds,
you may want to go to
the destination
manually.
</body>';
The problem with this when the file has been uploaded there is no way back to mydbr other than redirect via a url call as the mydbr header is gone along with it look and feel. Hope you follow that.
I can't just use dbr.html for the php code as I have a block of code that connects to the db to populate a select list. Maybe there's a way to do this.
The php file's code is:
<div style="width: 50%; margin: 0 auto;">
<h2>Image Upload</h2>
<form method="post" action="uploadimg.php" enctype="multipart/form-data">
Select Site:
<select name="image_site">';
<?php
$link=mysql_connect(localhost, $mysqlusername, $mysqlpassword) or die ("Error connecting to mysql server: ".mysql_error());
mysql_select_db($dbname, $link) or die ("Error selecting specified database on mysql server: ".mysql_error());
$imgquery="SELECT Site_Name FROM tblsitesjake where Site_Status = 'Active' order by Site_Name"; $imgresult=mysql_query($imgquery) or die ("Query to get data from the table failed: ".mysql_error());
while ($imgrow=mysql_fetch_array($imgresult)) { $imgSite=$imgrow["Site_Name"]; echo "<option> $imgSite </option>";
}
?>
</select>
Select Type: <select name="image_ctgy"> <option value="Unit">Unit</option> <option value="Kitchen">Kitchen</option> <option value="Tile">Tiles</option> </select>
Select Image File: <input type="file" name="userfile" size="40"> <input type="hidden" name="MAX_FILE_SIZE" value="10000000">
<input type="submit" value="Upload"> </form> </div>
Thanks again for any help
Jake