This topic is locked
[SOLVED]

  add.php with parameters

4/16/2007 6:18:44 AM
PHPRunner General questions
P
psychodad71 author

I would like to call the add.php with parameters such like the parameters of edit.php (edit.php?editid1=BA1.1&editid2=2006&editid3=9) from the ms reporting services where I have the possibility to build urls with parameters.
The three id fields should be hidden in the add.php page to avoid incorrect data.
add.php?editid1=BA1.1&editid2=2006&editid3=9
The record could not be added because of missing id fields.
<<< Record was NOT added >>>
mssql_query() [function.mssql-query]: Query failed
Any suggestions.
psychodad

Sergey Kornilov admin 4/16/2007

What is the idea of passing parameters to the Add page?
How do you plan to use those parameters?

P
psychodad71 author 4/17/2007

I've a report which shows different kpi (key perpormance indicators) for each year and each month. The last field of the each row shows a link which calls the edit.php / add.php of the phprunner. Some of these kpi should be added /edited manually by the user. If the key is already there it should only be edited.
edit.php?editid1=BA1.1&editid2=2006&editid3=9
This is no problem. If there is no key for this month and year it should be added, but only the key for this month and year.
add.php?editid1=BA1.1&editid2=2006&editid3=9
Therefore I would like to pass parameters to the add.php

Alexey admin 4/17/2007

Hi,
use default values for this.

Open your Add page in Visual Editor, double-click key fields and put the following Default values there:

@$_GET["editid1"]@$_GET["editid2"]

@$_GET["editid3"]



In this case your link to Add page will work.