Right here goes :(

Just when i thougfht i had done everything that had to be done the client
wants something else as well.  that something else is another 2 tables in
the database that are of a diffrent layout from the original 2. This means i
need to build a few more pages with diffrent layouts to acommidate the data
being returned, this is fine.
What my problem is:

Here is the url to the admin area
http://thor.ancilenetworks.co.uk/~pferrie/vinrev/adm/index.html
username: paul ferrie
pass: admin

the first 2 db's in the drop down menu are fine, it's the third and the
fourth.  I need to build a "if" statement that checks the name of  tablename
and then echo the relivent links
Here is the code in the links page as it is
--------------
<?php
if (isset($_GET['tablename'])) {
    echo "<b>{$_GET['tablename']}</b> loaded <br><BR>";

} else {
 "<i>$tablename</i> did not get sent";
}
?>
<a href="view.php?tablename=<? echo $_GET['tablename'] ?>"
target="main">View
database</a><br>
<a href="search.php?tablename=<? echo $_GET['tablename'] ?>"
target="main">Search database</a><br>
<a href="insert.php?tablename=<? echo $_GET['tablename'] ?>"
target="main">Insert record</a><br>
<a href="delete.php?tablename=<? echo $_GET['tablename'] ?>"
target="main">Delete record</a><br>
<a href="edit.php?tablename=<? echo $_GET['tablename'] ?>"
target="main">Edit record</a><br>

-------------

I had a tinker about witht the code but my php is not that good i was
thinking something like:
-------------
<?php
if (isset($_GET['tablename'])) {
    echo "<b>{$_GET['tablename']}</b> loaded <br><BR>";

} else {
 "<i>$tablename</i> did not get sent";
}
if($tablename="blah"){
echo"<a href="view.php?tablename=<? echo $_GET['tablename'] ?>"
target="main">View
database</a><br>"
echo"<a href="search.php?tablename=<? echo $_GET['tablename'] ?>"
target="main">Search database</a><br>"
echo"<a href="insert.php?tablename=<? echo $_GET['tablename'] ?>"
target="main">Insert record</a><br>"
echo"<a href="delete.php?tablename=<? echo $_GET['tablename'] ?>"
target="main">Delete record</a><br>"
echo"<a href="edit.php?tablename=<? echo $_GET['tablename'] ?>"
target="main">Edit record</a><br>"
}else if($tablename="blah2"){
and so on
}
?>
-------------

I cant get the links to echo
Any help much appreciated

cheers
Paul

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

Reply via email to