CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 How can my database users insert their passport photo

Print topic Send  topic

Author Message
mnwuzor

Posts: 14
Posted: 11/05/2013, 6:32 PM

Hello,

Please how can I design my form so that my users can insert their individual passport photo graph on their form just as seen here http://examples.codecharge.com/EmployeeDirectory/EmpsDetail.php?emp_id=20

I am building a registration form that will need a single passport photo insertion. My platform is PHP and database is MySQL.

Please Note: I am not so good in coding and just learning how to use Code Charge for the first time.

Thanks
Mike
View profile  Send private message
acedrummond


Posts: 90
Posted: 11/07/2013, 7:04 PM

With version 5.0 on the FORMS tab there is the ability to add a FILE UPLOAD capability.
That will help you to capture the image.

Use an picture image on your form to display the uploaded file - again these are found on the FORMS tab.

_________________
Ace Drummond
View profile  Send private message
eratech


Posts: 513
Posted: 11/07/2013, 8:19 PM

Mike - rather than building it all yourself, could you use the 'Employee Directory' solution that's on CCS 'home screen' when you open the program?

You can get the database script for MySQL in the same location as the Intranet.mdb is stored (usually something like 'C:\Programs\CodeCharge\Examples\Intranet....)

Run the script on MySQL to create the DB, set up the user and login, then create a new project with the 'solution' of Employee Directory and point it at MySQL.

It would save a lot of time, and you can cut out what you don't want, rather than trying to replicate what you do want.

Cheers

E
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia
View profile  Send private message
mnwuzor

Posts: 14
Posted: 11/08/2013, 8:27 AM

Quote eratech:
Mike - rather than building it all yourself, could you use the 'Employee Directory' solution that's on CCS 'home screen' when you open the program?

You can get the database script for MySQL in the same location as the Intranet.mdb is stored (usually something like 'C:\Programs\CodeCharge\Examples\Intranet....)

Run the script on MySQL to create the DB, set up the user and login, then create a new project with the 'solution' of Employee Directory and point it at MySQL.

It would save a lot of time, and you can cut out what you don't want, rather than trying to replicate what you do want.

Cheers

E

Hi,

Thanks for your response. I did as you said and the employee dir is up but the images are not really showing. I dont know the problem.

The main issue I have the directory is where the login details are saved in the table and how can I create a login page for the database I am currently working on.

I need the login page to authenticate the users such that you must be logged in to access the database.

I am new to Code Charge. Pardon my many questions as I ask when I lost or confused.

Mike
View profile  Send private message
mnwuzor

Posts: 14
Posted: 11/08/2013, 8:28 AM

Quote eratech:
Mike - rather than building it all yourself, could you use the 'Employee Directory' solution that's on CCS 'home screen' when you open the program?

You can get the database script for MySQL in the same location as the Intranet.mdb is stored (usually something like 'C:\Programs\CodeCharge\Examples\Intranet....)

Run the script on MySQL to create the DB, set up the user and login, then create a new project with the 'solution' of Employee Directory and point it at MySQL.

It would save a lot of time, and you can cut out what you don't want, rather than trying to replicate what you do want.

Cheers

E

Hi,

Thanks for your response. I did as you said and the employee dir is up but the images are not really showing. I dont know the problem.

The main issue I have the directory is where the login details are saved in the table and how can I create a login page for the database I am currently working on.

I need the login page to authenticate the users such that you must be logged in to access the database.

I am new to Code Charge. Pardon my many questions as I ask when I lost or confused.

Mike
View profile  Send private message
eratech


Posts: 513
Posted: 11/08/2013, 8:19 PM

Mike - we were all beginners once.

Not sure about the images (but they can be a little tricky sometimes) so you might need to keep checking things like upload directories, and ensure that the image location (ie: img src) matches where the webserver is putting them.

Security - much better for me to answer. In the Project Settings, look for 'Security' and you can set up the authentication based on a database table. Select the table, and what fields hold the Id, Login, password, and any groups (Admin, Reader, Editor etc) that you want.

You then type in what the groups mean in the 'Security Groups' part of the Project Settings. Add the levels you want (can use Text or numbers for Group ID)

Note that you can choose a number scale (level 5 accesses everything that levels 1 through 4 can see) with the 'Higher Levels Inclusive of Lower Levels' ticked, or have completely separate levels (Read Only; Editor; Admin) and untick that box.

Right - once you have the Security set up, and put a user in to test with, you can create a new page and use the 'Authentication Builder' to make the login page. It will use the details you selected and make a nice login. Make sure you change the Property that tells the login where to go when you have successfully logged in (Return Page) or you will go no where.

On each of the pages you want to lock down, click on the page, look for the Property 'Restricted' and select the tick boxes you want. You also need to go back to the Project Properties > Security, and select the 'Login page' which also will tell all the other pages where to send the user if they need to log in.

Password hashing - this is my pet peeve for CCS - it does a lot of stuff very well, and passwords very badly.

By default, the passwords are stored in plain text which means zero security if the passwords are found. At the very least you could use a 'hash' function to make the passwords at least a little more secure.

AFTER you are happy with your working login, you can pump up the password security. In the Security settings, click the 'Advanced' button, then tick 'Encrypt passwords using' and tick the 'Code' radio button. If you are using PHP put this:

hash('sha256','NV0mRJ5CcMQC'.{password})

What this means is: using the built-in PHP functions 'hash', using the 'sha256' hashing method, add the random string 'NV0mRJ5CcMQC' in front of the {password} variable (and note the curly braces - this tells CCS to substitute the user's password when it is used - search in Common.php to see what the results are)

You must change the random string to something else on your system - just 8 random characters & numbers will do.

This will *not* be the best password hashing method, but it will be better than plain text, and it is quick to implement.

And remember, if you hash the password, you will need to put your own hashed version of the password in the User table so you can log in. A plain PHP file with the function and an 'echo' to the screen is useful. That's the only advantage of plain text passwords - you can type them in yourself.

Sorry for the verbose answer. It's Saturday afternoon here and I'm avoiding doing my real work.

Cheers

Eric
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia
View profile  Send private message
mnwuzor

Posts: 14
Posted: 11/10/2013, 4:51 PM

Hi Eric,

Thanks for your detailed explanation.

For now the major issue before me is how I can create a report with 3 different columns and 3 rows. I have a report with a Form layout. Each record has 5 fields. This make up a form. Now I want the forma to show on 3 rows and 3 columns. When I set it under the report or grid builder, it will return to 1 column.

Please HELP!!!

Mike
View profile  Send private message
ckroon

Posts: 869
Posted: 11/15/2013, 11:30 AM

Can you create a record, then just add rows/columns and move the labels around to suit your needs?
_________________
Walter Kempees...you are dearly missed.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.