Jump to content

Where to add something to log-in page?


Guest chrisjchrisj

Recommended Posts

Guest chrisjchrisj

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);

}

?>

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Guest chrisjchrisj

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...