Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

no input file only if include arguments

Status
Not open for further replies.

Horrid

Programmer
May 20, 1999
373
Odd problem with php, if I call index.php it works fine. Try index.php?x=1 and I get No input file specified.

I assume its a config error but I just can't find the cause. I have configured php a few times before and never had this happen, maybe something to do with the newest version.

Anyone have any ideas on this one?
 
Include() behaves differently on local files vs http requested files, if you include(file.php?x=1) it will fail and file.php?x=1 does not exist, if you include( it will behave as you expect.

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Interesting, didn't know that. Thanks for the info.
I dumped php and installed again and off it goes, I think I had set something odd in the config.
 
Hi and thanks in advance to anyone who can help me.

I have to php pages. The first page contains all records in a database the user can then select a record and edit it - bringing them to the editRecord page. On the edit record page the information about the record once again appears in text boxes to allow the user to change whatever they wish however a few fields are made up of dropdownlists - which are also populated from a database.

- My Problem is: on the editRecord page I want the dropdown list fields to have the item selected that was previously saved in the database. I have tried several different things but nothing is working for me.

Here is the code I am using:

<?PHP
//sql statement to read the value that are currently saved for the record
$sql= "Select * from redo where counter ='$counter'";
$result=mysql_query($sql, $db);
if($myrows = mysql_fetch_array($result)){
do{
//$date does not use dropdown list
$date=$myrows["Date"];
//$type will use a dropdown list
$type=$myrows["Type"];
}while($myrows=mysql_fetch_array($result));
}
?>

<Table align ="center">
<tr>
<tr></tr>
//date field is populated
<td colspan =2 align="Right"><B>Date:</B></td><td><input type ="TEXT" name="date" value="<?PHP echo "$date"?>";></td>

</tr>

<tr>
<tr></tr>
<td colspan =2 Align ="Right"><B>Type:</B></td>
<td>
//code to populate the dropdown list
<?PHP
$db = mysql_connect("12.1.0.0", "root");
mysql_select_db("RedoDatabase", $db);
$sql ="SELECT Type From typedescription";
$result=mysql_query($sql, $db);
$rowResult2=mysql_fetch_assoc($result);
$totalRows2=mysql_num_rows($result);
echo "<select name = type selected ='.$type.'>";
while(list($type)=mysql_fetch_row($result)){
echo "<option value='$type'>$type</option>\n";
}

echo "</select>";
?>
</td>

 
Sorry about the post above I thought I was posting a new thread!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top