1-2-3 step for utilizing uploadform, was: re: Is there going to be an update to
Hi Daniel,
It's driving me batty. I would like to learn to do what should be simple for a web designer.
New site. Starting from scratch. Using the uploadForm3 files annotated in a previous post. I've started working from uploadForm3_add.php into my own ordering.php page. Right now it's a basic skeleton. I haven't configured any security checks, email thank yous, etc. as I just want to get the form working and working with the upload field. Right now it adds the record to the database and every field adds properly EXCEPT the upload portion.
The ordering.php calls to include the iframe page (uploadForm3_iframe-1.php) because a photo/image needs to be uploaded via this ordering.php page and inserted into the CMSB database in a section called "orders".
Here's the call:
<tr>
<td valign="top">Uploads</td>
<td>
<?php /* TODO: Add security check in uploadForm3_iframe.php to limit access to only allowed uploads */ ?>
<iframe src='uploadForm3_iframe-1.php?table=<?php echo $tableName ?>&field=upload&num=<?php echo $recordNum ?>&preSaveTempId=<?php echo htmlencode($preSaveTempId) ?>'
height='100' width='600' frameborder='0' scrolling='no'>
</iframe><br/>
</td>
</tr>
If I use the incorrect url or don't have the iframe page available then I get a piece of the 404 page showing on the ordering.php page. If I include the iframe page correctly then I just get a blank section. (in fact, if I even try to view just the iframe page in a browser I get a blank page, no errors and viewing source is blank too). I suspected that maybe the .htaccess file is blocking iframes but doesn't appear to. Here's what's in my .htaccess file:
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [L,NE,R=301]
Options -Indexes
ErrorDocument 404 /index.php
ErrorDocument 401 /index.php
ErrorDocument 403 /index.php
<Files 403.shtml>
order allow,deny
allow from all
</Files>
At the moment I have gone back to the beginning and just uploaded the iframe file "as-is" (from my download from the forum post)...no variables changed at all on the iframe page. If I modify the top of the iframes page to use the same require once line as the ordering.php page has
then I get the following error:
Tablename 'orders' isn't in list of allowed tablenames!
At least it's not blank.