Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Reconstruction of create_account.php


ebizbuys

Recommended Posts

I have fully customised OSC and one thing I am stuck on is giving the ability for a user to upload their own personal profile image for themselves which is shown in some other pages I have built.

 

I have used the admin 'upload' class and I am using it in create_account.php. I will also be setting size limits but I am still stuck trying to upload. Here in the process I have something like:

 

process:

$users_image = new upload('users_image');

$users_image->set_destination(DIR_WS_IMAGES);

if ( ($users_image->parse() == false) || ($users_image->save() == false) ) {

$error = true;

 

$messageStack->add('create_account', ENTRY_LOADING_PROFILE_IMAGE_ERROR);

}

 

body: The form call

<?php echo tep_draw_form('create_account', tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'), 'post', 'enctype="multipart/form-data"') . tep_draw_hidden_field('action', 'process'); ?>

 

body: The form field

 

<?php echo tep_draw_file_field('users_image','file'); ?> Ps. the 2nd parameter I need or else I dont get the browse button? Not sure what I am doing with it either.

 

Look any help would be much appreciated.

 

thanks in anticipation

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...