Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi everyone,
Been reading through a couple of forums, just a couple of things been bugging me - been writing in Perl (arrgh) and looking to switching to PHP completley (kind of mid-transition like tables -> css [which I've done woohoo] down with tables!)
I am currently posting hidden variables [ALL system variables] using forms and header files eg fields like 'action', 'clientid' etc -> and am thinking of using sessions but was warned that they can be hijacked. (Apologies if this is an ignorant comment)
I am probably completley wrong but can you just pas/retrieve session variables simply and securley?
The current way I am doing things works, but if I need say 20 variables passed, they have to be included as hidden in every form and theres got to be a better way (? I hope ?)
[u]Iterating through mysql records[/u] (basic example - any comments would be great as get sick and tired of bodging it)
is there an easier way of outputting dynamic variables than <?=$variable?> or "asads ".$variable." asda<br>";Code: Select all
while ($row = mysql_fetch_array($res)) {
print '<form action="clients.php" method="post" name="form_'.$row['clientid'].'">';
print 'Client : '.$row['clientid'].'<br>'; // Perl you can do the following : "Client : $row['clientname']"
print '<input type="submit" value="Edit Client">';
print '<input type="hidden" name="clientid" value=" '.$row['clientid'].' ">';
print '<input type="hidden" name="action" value="clientEdit">';
}Everah | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]