This topic is locked

A few probably very basic questions

1/12/2007 4:14:34 PM
PHPRunner General questions
I
ictaylor author

Hi everyone
I am currently designing my first site using php and am very new to it so please bear with me.
I have a couple of questions regarding phprunner which Im sure will be easy for you to answer.

  1. I have a page where visitors submit their info to my website. I have it all working and the page is called _visitor_add.php from which I have removed the links to view/search etc as I dont want them to be able to do this. My 'database table' is currently not password protected and I am worried that if a visitor guesses _visitor_list they will be able to access this sensitive info - how can I password protect the list pages for just my access and leave the 'add' page password free?......... I have only managed to figure out how to password the whole lot or nothing!
  2. How do I create a 'register' function allowing users to register for my site using the program? and include this so that the visitors mentioned above can add their info and I can see who is doing it on the list page?
  3. I dont seem to be able to changes the colours on the tables. For example, the add page where my visitors submit their details just defaults to certain colours. I want to be able to change the colour of the cells in different columns (for example I want my column which names the fields (e.g name, phone number etc) to be yellow text and blue background? - editing it by html doesnt work and stops the scripts working
  4. Finally I cant integrate the database into my existing website. I am a beginner and use MS Frontpage for the html. I have an existing website where all the pages are in html and are finished. If I copy the script into my visitor page inside an existing table created in frontpage on the page the script no longer works - please help!

T
thesofa 1/12/2007

Hi

If you look at Post #11 in this thread here it might be helpful for you.

When you get to the security page, there are loads of options there, just explore each and every button you find, you will see a tick box to allow users to register, you can allow guest access, you can control access in groups of people and when you set up group permissions, you can allow by group access to all or any or none of each of the pages.

as well you can allow users to see there own posts only or see all but alter there own only or see and alter all posts.

It is a fantastically powerful programme under the bonnet.

Have fun exploring, just don't try to make a final project at your first try and learn to search the forum well, there are lots of answers in here.

The trick is to ask the right question!

Good luck and come back if you need more help.

Alexey admin 1/15/2007

Hi,
please see my answers below.

  1. Click Advancedbutton on Securitytab, choose to create Guest user there.

    Click User group permissions and assign permissions there.

    Grant full permissions to your admin user and Add only to <Guest> user.
  2. Click User login settings on the Security tab and check off New user registration page there.
  3. Try using Cell properties and Font color button in Visual Editor to change cell background.

    If this doesn't help please give me more detailed info on what do you need to achieve and what you did.
  4. This won't work. Use Visual Editor in PHPRunner to alter PHPRunner-created pages appearance.

D
dossi 1/17/2007

May be this will help you......
Sorry about my English, but I left school in 1971.
PHP Runner has its own protection system. With two tables it is easy to manage.
But I prefer to work with .htacces and .htpasswd to protect folders.

It works with following code:
Put in Gobal Events
Registrationpage
function AfterSuccessfulRegistration()

{

//** Custom code ****

$res = mysql_query("select * from tablename");

$safe= "../firewall"; // relativ Document Root
$htpasswd= fopen("$safe/.htpasswd", "w");

while($data=mysql_fetch_object($res))

{fputs($htpasswd, "$data->user:".crypt($data->password,CRYPT_STD_DES)."\n");}

fclose($htpasswd);}
You also have to put the code into Change Passwordpage, Edit Password Page etc.
Good luck

dossi