Guest chrisjchrisj Posted May 26, 2007 Share Posted May 26, 2007 The Log-in page that asks for email and password, what file would I go to to add a upload/browser box to that page, so that it appears below the Email and Password fields? When I go to log-in the browser it shows somthing like this: http://www.awebsitename.com/catalog/index....sb2cvahiuweyiou Any help would be appreciated. Thanks. Quote Link to comment Share on other sites More sharing options...
markscarts Posted May 26, 2007 Share Posted May 26, 2007 skins/xxx/styleTemplates/content/login.tpl Quote Link to comment Share on other sites More sharing options...
Guest chrisjchrisj Posted May 26, 2007 Share Posted May 26, 2007 skins/xxx/styleTemplates/content/login.tpl Thank you for your reply and assistance. I have this php code to add, and I added it at the very end of the page, as is, just to see if the upload box appeared and it did not. Can you tell me what i'm missing, or need to change? Thanks. <?php if (isset($_SESSION['customer_id'])) { echo ' <form action="/WHEREVER IM GOING/" enctype="multipart/form-data" method="post"> <p> Please specify a filebr /> <input type="file" name="myfile" size="40"> </p> <p> <input type="submit" value="Send"> </p> </form>'; } if (!empty($_FILES)) { $connection = mysql_connect("hostname", "username", "password"); $db = mysql_select_db("dbname", $connection); mysql_query("INSERT INTO upload_track (customer_id, filesize) VALUES (" . $_SESSION['customer_id'] . ", " . $_FILES['myfile']['size'] . ")", $connection); } ?> Quote Link to comment Share on other sites More sharing options...
markscarts Posted May 26, 2007 Share Posted May 26, 2007 PHP code is disallowed in XTemplate files - these are xhtml files with .tpl extensions. One of the beauties of cubeCart programming is the fairly strict separation of PHP and XHTML code. You will never get a php script to work in the template files. Just search a bit, this has been covered before. Quote Link to comment Share on other sites More sharing options...
Guest chrisjchrisj Posted May 26, 2007 Share Posted May 26, 2007 PHP code is disallowed in XTemplate files - these are xhtml files with .tpl extensions. One of the beauties of cubeCart programming is the fairly strict separation of PHP and XHTML code. You will never get a php script to work in the template files. Just search a bit, this has been covered before. Thanks for that great bit of information. I appreciate you enlightening me. I'm learning everyday. I searched under "upload", can you suggest a better search term for what I'm looking for? thanks again. Quote Link to comment Share on other sites More sharing options...
markscarts Posted May 26, 2007 Share Posted May 26, 2007 Chris if you look just next door in skins and templates forum only eight or ten postts down you see this: Adding PHP to the tpl files Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.