Re: [PHP] showing in pages selecting result?

2005-11-21 Thread xkorakidis
Thanks so much Jochem,
I found some things in phpclasses (good material, bad design) and I'll
try that.
Thanks!

Jochem Maas wrote:
> xkorakidis wrote:
>> Hi,
>> How can I present into pages the result of sql select? (e.g. pages of 10
>> records)
> 
> by performing queries that only grab part of the data and passing along a
> variable in the relevant urls that allow you to see how far along
> in the list you are (i.e. what page).
> 
> the term you want is 'pagination' and if you search the web for that and
> 'php'
> you will find enough examples to get confused by. ;-)
> 
> 
>>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: AW: [PHP] how can I CALL a PHP script from different TEXT LINKS with differentPARAMETERS?

2005-11-20 Thread xkorakidis
That's right Curt,
this is the reason I characterised sending parameters via url not safe!
But in case of selecting data, I think there is no problem to send data
via url, right?
anyway, I found more simple using POST in any case because I have
already used that and works, so I prefer POST...
Thanks!

Curt Zirzow wrote:
> On Sun, Nov 20, 2005 at 04:12:05PM +1300, Jasper Bryant-Greene wrote:
>>xkorakidis wrote:
>>>Webmaster, thanks very much but I think it would be safer to do that by
>>>post, not by get. Furthermore, if I use indivudual files
>>The difference between POST and GET lies in the semantics -- POST 
>>represents something changing on the server, e.g. updating a database 
>>field, and allows the browser to warn the user if they try to refresh. 
>>GET represents nothing of importance changing on the server, e.g. 
>>performing a search on the database, and can safely be repeated.
> 
> Another good reason to use POST to modify data, consider the link:
> 
>   http://example.com/posts.php?postid=1&action=delete
> 
> If googlebot comes across your page containing a list of all your
> posts, with a link like that, you just might wake up one morning
> wondering why all your posts are gone.
> 
> Curt.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] showing in pages selecting result?

2005-11-19 Thread xkorakidis
Hi,
How can I present into pages the result of sql select? (e.g. pages of 10
records)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: AW: AW: [PHP] how can I CALL a PHP script from different TEXT LINKSwith differentPARAMETERS?

2005-11-19 Thread xkorakidis
Thanks so much Mirco, but I would appritiate that very much if I had
some examples. I'm not so keen in php, so some things seem to be complex
for me. I downloaded OSCommerce but the script pages aren't so simple
for beginning...
So if you have something (code/url of examples) about this type of
encryption-decryption and that type of programming you describe in next
msg (classes, functions etc) plz send me. The only way I work until now
is to call a php script page wich does an individual work. Guess that is
the "jumpto" script?
Thanks!

Mirco Blitz wrote:
> HI,
> 
> I totaly agree to Jaspers answer.
> 
> That’s why I use ONE jumpto script and GET.
> 
> I usually encrypt the given Values I give over to the script and decrypt
> them on recive. That way nearly nobody can assume wich values are really
> given to the script.
> 
> If you want to make it rocket safe, generate a random string that you place
> in a session variable for crypting and decrypting. By that way the value is
> different on every startup and you can be ure that you have made it when
> decrypting. If someone try's to use xsripting and try's to fool your script,
> latest the case structure yould not work, cause no plausible data is
> recived.
> 
> But who would like to xscript on a jump page, it can't harm really. 
> 
> Greetings
> Mirco
> 
> -Ursprüngliche Nachricht-
> Von: Jasper Bryant-Greene [mailto:[EMAIL PROTECTED] 
> Gesendet: Sonntag, 20. November 2005 04:12
> An: xkorakidis
> Cc: php-general@lists.php.net
> Betreff: Re: AW: [PHP] how can I CALL a PHP script from different TEXT
> LINKSwith differentPARAMETERS?
> 
> xkorakidis wrote:
>>Webmaster, thanks very much but I think it would be safer to do that by
>>post, not by get. Furthermore, if I use indivudual files
> 
> It is a fallacy to ever tell someone that POST is safer than GET. They 
> both transmit data in plaintext and it should not be assumed that either 
> is inherently safer than the other, as this simply gives others a false 
> sense of security.
> 
> The difference between POST and GET lies in the semantics -- POST 
> represents something changing on the server, e.g. updating a database 
> field, and allows the browser to warn the user if they try to refresh. 
> GET represents nothing of importance changing on the server, e.g. 
> performing a search on the database, and can safely be repeated.
> 
> SSL/TLS is the best option if you wish to transmit sensitive data.
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] how can I CALL a PHP script from different TEXT LINKS with differentPARAMETERS?

2005-11-19 Thread xkorakidis
Ahmed thanks for your comments,
the situation is that before calling "searchMember.php" or
"searchProduct.php" or other, I need to give to user an interface where
a message like "insert the Product/Member/Order Id", then when he
inserts and presses "find" the appropriate "searchSomething.php" page is
called, depending on what whe had selected to search for.
Of course I can make 3 individual pages ("SearchProductIsertId.php",
"SearchMemberInsertId.php", "SearchOrderInsertId.php"), where each page
will call another page (e.g "SearchOrderInsertId.php" ->
"SearchOrder.php"). This seems easier but if a change is needed in
"SearchSomethingInsertId.php", I'll have to change all the 3 previous
pages. Thus I thougt it would be better to make only one page for all
searches.
What is the common choice of experienced php devs in case of creating an
administrative interface for various tables (e.g. products, members,
orders etc)?

Thanks,
Christos Korakidis

ahmed wrote:
> On 11/19/05, Webmaster <[EMAIL PROTECTED]> wrote:
>>You can send data to the next php file by HTTP-GET.
>>Simply add a ? behind the link and then =.
>>Example   ./jumpto.php?to=searchProduct
> 
> Well i think it was about the code inside the search/add/edit pages
> not how to reach them.
> If i understood correctly, you're trying to reduce the amount of code
> to write by applying a pice of common code on your objects
> (product/member/order) while adding specific functionality using a
> switche specifed as a paramter (?object=Product/Member/Order)... It
> just all depends on "how common" are these operations that needed to
> be applied in each case.. so you knows that better
> 
> -ahmed
> 
> 
> --
> ahmed

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: AW: [PHP] how can I CALL a PHP script from different TEXT LINKS with differentPARAMETERS?

2005-11-19 Thread xkorakidis
Webmaster, thanks very much but I think it would be safer to do that by
post, not by get. Furthermore, if I use indivudual files
("searchProductInsertId.php", "searchMemberInsertId.php"...), I think it
is easy: in each link of the menu I can type:
Search,
Search etc.
But, due to the fact that the html part of each SearchInsertId page
doesn't have  many differences between various search pages (in first
case will show a message "type a productId to find" and will be
connected with "searchProduct.php", in second case will show a message
"type a memberId to find" and will be connected with "searchMember.php",
and so on), I thought to make a searchSomethingWithId page, where the
text and post php page will differentiate dependetly on what user had
clicked on menu. So I think that the problem I have, is what exactly
should be writen on each "Search", "Add" of menu so as to help the
searchSomethingWithId page to understand what "search" or "add" was
clicked, and secondly, what should be written on searchSomethingWithId
page so as to call the appropriate "search" or "add" php page.
I have some code about sessions and global values, I would preffer a
solution involving global values if it is safe. I used in past forms and
buttons to send information to php page but now I would like to use text
links instead of buttons.

I hope I helped you to understand and give me some help :)
Thaks a lot!
Korakidis Christos

Webmaster wrote:
> Hi,
> i hope I got you right.
> 
> You can send data to the next php file by HTTP-GET.
> Simply add a ? behind the link and then =.
> Example   ./jumpto.php?to=searchProduct
> 
> In the jumpto.php you would ask the Global Array for Get Variables for the
> entry and then decide what to do.
> 
> Example:
> 
> sf($_GET["to"] == "searchProduct"){
>   header("Location: ./searchProduct.php");
> }
> 
> Or if you have a lot of locations to jump to you could do that by case.
> 
> switch($_GET["to"]){
>   case "seachProduct":
>   header("Location: ./searchProduct.php");
>   break;
>   case "seachMember":
>   header("Location: ./searchMember.php");
>   break;
> }
> 
> I hope that helped.
> 
> Greetings
> Mirco Blitz

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] I can't see my msgs...

2005-11-18 Thread xkorakidis
I can't see my posted msgs...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] how can I CALL a PHP script from different TEXT LINKS with different PARAMETERS?

2005-11-18 Thread xkorakidis
Hi,
I'm not so keen on PHP (so on English :) ) and I have a little problem:
On the left side of the page there is the following menu:

PRODUCTS
Search
Add
MEMBERS
Search
Add
ORDERS
Search
Add

Is that possible to link each "Search", "Add" to a "Search.php" and
"Add.php" page and give a parameter to php script so as to make an "on
the fly" "searchProducts.php" or "AddProducts.php" or
"SearchMembers.php" etc?
If I make individual "searchProducts.php" or "AddProducts.php" files
these won't have many differences, so I Think it's better to make these
on the fly.

Any Idea?

Thanks in advance.
Christos Korakidis

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] how can I CALL a PHP script page from a TEXT LINK?

2005-11-18 Thread xkorakidis
Hi, I'm not so keen in php (so in english :) ) and I had a problem:
In left menu I have got choices like :

PRODUCTS
Search
Add
CUSTOMERS
Search
Add
ORDERS
Search
Add

I need to make links to each "Search", "Add" for the appropriate php
script pages. In other words I'm trying to make a simple administrator
interface. When Administrator finds a PRODUCT/CUSTOMER/ORDER, he can
edit/delete it.

The problem I have is that how can I call the appropriate php script
page when administrator clicks on each "Search"/"Add". Is there any easy
way or any better solution generally?

Thanks in advance.
Christos Korakidis

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php