[PHP] [?] Call a function with a button/link click?

2001-03-13 Thread John Voth


I am wondering how to call a function simply by clicking a button
or a hyperlink?

I would like to use this technique to avoid passing things in a link

Presently, I use this technique: 
Delete

I would like to clean things up by having one central or common include
file and just call functions out of it. The problem lies in the passing
of variables to that function - how to set something up so that the user
can click on something to activate that function with a variable.

Psuedocode:

if( buttonclick )
  delete_thing($thing_id)

Am I making sense?

Thanks in advance.
John

-- 

/\
| John Voth   Mobiltex Data Ltd.Calgary, Alberta,Canada, T1Y-4T7 |
| [EMAIL PROTECTED] 403-291-2770, 403-259-6795 (fax)|
\/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] [?] How to make many one line forms in a loop?

2001-03-14 Thread John Voth

Howdy Folks!

I am wondering how to make a giant list of forms in a loop. 

My goal is to search the database for the data in the cell clicked.

This is step by step process that I would like to achieve:
 1. Dump the contents of the website_log db to the browser in a table
format.
 2. User clicks on any cell in the table.
 3. A new sql query is submitted to mysql based on the data in that
cell.
 4. The sql results are redisplayed in table format in the browser.


Presently, here's what I have:

I have a mysql db filled with access logs - things like HTTP_REFERER,
etc.
Presently, I dump them out to the browser like this:

Log File Dump";

  echo "
   
  ";
  echo "
Log ID#
Remote
Address
File
Accessed
Accessed By
On this
Date
 ";

  while ($row = mysql_fetch_array($result))
  {
$log_id = $row["lid"];
$remote_address = $row["remote_addr"];
$file_id = $row["php_self"];
$user_id = $row["uid"];
$time_of_event = $row["event_time"];

echo "
  $log_id
  $remote_address
  $file_id
  $user_id
  $time_of_event
";
  }
  
  echo "";
  echo "";

  mysql_free_result($result);
  mysql_close($db);

?>


What I would like to do is convert the echo statement in the while loop
into 
something like this:

  echo "

  
  
  
  


$remote_address
$file_id
$user_id
$time_of_event
   ";

I've tried the above modification but PHP silently barfs on it.

Would anyone have any insights or suggestions?

Thanks in advance!

John
-- 

/\
| John Voth   Mobiltex Data Ltd.Calgary, Alberta,Canada, T1Y-4T7 |
| [EMAIL PROTECTED] 403-291-2770, 403-259-6795 (fax)|
\/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] [?] How to make many one line forms in a loop?

2001-03-14 Thread John Voth

Hi Chris,

THANKS!  Really BIG THANKS!!

That was the problem.

John

Chris Lee wrote:
> 
> more lilly then not its the " ' problems.
> 
>  echo "
>  
>  
>  
>  
>  
>  
>  
>  
>  $remote_address
>  $file_id
>  $user_id
>  $time_of_event
>  
>  ";
> 
> is better
> 
> --
> 
>  Chris Lee
>  Mediawaveonline.com
> 
>  ph. 250.377.1095
>  ph. 250.376.2690
>  fx. 250.554.1120
> 
>  [EMAIL PROTECTED]
> 

-- 

/\
| John Voth   Mobiltex Data Ltd.Calgary, Alberta,Canada, T1Y-4T7 |
| [EMAIL PROTECTED] 403-291-2770, 403-259-6795 (fax)|
\/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]