This topic is locked

unsigned user to view the page

4/10/2007 11:04:34 PM
PHPRunner General questions
kanso author

Hi,
I've created an users table, also an anothere table for the editing text and uploading images.

Everything works as it should be and I am able to login, view both table and edit text and upload images, no problem.
Now, I want the public users to be able to view the images and read text table without signing up with just a link from the site.
Is this possible? If so, how can I do this?

I am guessing it can be done with "image/text edit table_getfile.php.

I'd read somewhere on this site about creating alumi record that way but I can't find it. It said to create an another project and save it under different folder but not much beyond that.
Thanks for the help.

J
Jane 4/11/2007

Hi,
I recommend you to create guest account for public users on the Advanced security settings dialog on the Security tab.

kanso author 4/11/2007

Hi,

I recommend you to create guest account for public users on the Advanced security settings dialog on the Security tab.


I understand the securitysetting.

My Question is , unsigned group, guests with no accounts , can they click a link button of home/avatar/view.html and look at the latest post? Another means, public.html on the site.
If not I might need a blogware.
Thanks

Sergey Kornilov admin 4/11/2007

Guest user has readonly access to all pages. Is that what you asking?

kanso author 4/11/2007

Guest user has readonly access to all pages. Is that what you asking?


Hi, Sergy,
I solved everything with phprunner and mySQL

I set up a database for a friend, he can log into database and add/edit file by himself. What I need is, a public display html page on the site, where other people can view downloaded image/text files after he had added and edited on the database.
I am learning as I go with a book, but somehow my tweaking the code skill from the book is not up to par.

I made a sample "browse.html" and made a link to "browse.php."

What is wrong with this script?

I am guessing I am requesting a page without a username or pass word, and it is creating a conflict with deconnection.php.
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/reasonab/public_html/browse.php on line 5

DB Selection failed.

Error # Error msg:
<?php

include("include/dbconnection.php");
if (!mysql_select_db('tablename', $db)) {

echo 'DB Selection failed. <br/>Error # ', mysql_errno(), ' Error msg: ', mysql_error();

exit;

}
$sql = "SELECT picture, title, blogin, tenet FROM tablename";

$result = mysql_query($sql, $db);

if (!$result) {

echo 'Query failed. SQL: ', $sql, '<br/>Error # ', mysql_errno(), ' Error msg: ', mysql_error();

exit;

}
while($row = mysql_fetch_assoc($result)) {

echo $row['picture'], '<br />';

echo $row['title'], '<br />';

echo $row['blogin'], '<br />';

echo $row['tenet'], '<br />';

}
if (!mysql_free_result($result)) {

echo 'Freeing results failed. <br />Error # ', mysql_errno(), ' Error msg: ', mysql_error();

exit;

}

if (!mysql_close($db)) {

echo "Couldn't close database <br />";

exit;

}

?>

kanso author 4/12/2007

Solved.
For someone who wants to do the same project:
Forget the code above.
I generated another project with list page only, without the login page, saved files in a different folder, tweaking the list.php and tweaking the list.htm to look completely diffrent from the database page. And intend to find a script to protect the url.
I am just realizing how much I can do with phprunner.
Thans, Jane & Sergy