http://dark-hope.com/index.php?id=downloadfile&dlid=98say i have index.php?id=downloads, how do i make it so the file will still use the id with another id like index.php?id=downloads?id=1.and i can figure it out cant someone help me? thx in advanced
?id=
#1
Posted 19 April 2005 - 01:18 PM
#2
Posted 21 April 2005 - 08:27 AM
index.php?page=download&id=1So you don't have to use "id" in all categories, or what I should call them (page in my case). Reply if you didn't understand.
#3
Posted 21 April 2005 - 12:41 PM
maansson, on Apr 21 2005, 01:27 PM, said:
index.php?page=download&id=1So you don't have to use "id" in all categories, or what I should call them (page in my case). Reply if you didn't understand.
#4
Posted 21 April 2005 - 04:59 PM
So for you to that, index.php?id=downloads&did=5
To use that in your page, you could just use $id = $_GET[id]; $did = $_GET[did]; It gets the id in the url. You can't use the same thing in your url like index.php?id=1&id=2 because it's all used as $id in your page
#5
Posted 26 April 2005 - 08:42 PM
<style type="text/css">
<!--
body {
background-color: #131516;
}
.style2 {
font-family: Verdana;
font-size: 9px;
color: #000000;
}
-->
</style>
<?php
include ("dbconnect.php");
if (isset($ID))
{
$tuts="SELECT * from sig where ID='$ID'";
$tuts2=mysql_query($tuts);
while ($tuts3=mysql_fetch_array($tuts2))
{
echo "
<font color=#000000 size=1 face=Verdana, Arial, Helvetica, sans-serif>$tuts3[message]<br>
<font color=#ffffff>$tuts3[description]"; }
}
else if(!isset($id))
{
$tut="SELECT * from sig ORDER BY ID ASC";
$tut2=mysql_query($tut);
while($tut3=mysql_fetch_array($tut2))
{
echo "<div align=center><table border=\"0\" cellspacing=\"1\" cellpadding=\"1\">
<tr>
<td><font color=#000000 size=1 face=Verdana, Arial, Helvetica, sans-serif>
<A HREF=\"javascript:void(0)\"onclick=\"window.open('view/sig/sigs.php?ID=$tut3[ID]','','height=172, width=400,scrollbars=no')\"><img src='$tut3[avatar]' border='0' alt='$tut3[title]'></a></td>
</tr>
</table></div>
"; }
}?>
</div>
<title>view.php</title>
i need to add it to this but where,i dont get it i add it and get errors
#6
Posted 27 April 2005 - 07:42 AM
Sincerily yours,
maansson
#7
Posted 27 April 2005 - 08:41 AM
#8
Posted 27 April 2005 - 08:05 PM
<?php
if($page == index && $id == 1)
{
echo 'This is hello and id 1';
}
elseif($page == index){
echo 'This is just going to be hello';
}
elseif(!$page){
echo 'this is with nothing typed in';
}
?>
dEcade
#9
Posted 05 May 2005 - 02:47 AM
dEcade, on Apr 28 2005, 01:05 AM, said:
<?php
if($page == index && $id == 1)
{
echo 'This is hello and id 1';
}
elseif($page == index){
echo 'This is just going to be hello';
}
elseif(!$page){
echo 'this is with nothing typed in';
}
?>
dEcade
Thanks in advance for any help.
#10
Posted 05 May 2005 - 08:35 AM
<?php
if( !$page )
{
echo"main page text.";
}
elseif( $page == index && $id == 1 )
{
echo"main text for ?page=index&id=1";
}
else if( $page == index )
{
echo"main text for the variables which will equil ?page=index";
}
?>
ok when you start off you can put an if statement on the first one because that will cary out that script first, but when you ad ?page=index&id=1 it needs else if so that if it shows its not the first statement it will move onto the next. The reason we have the $page == index && $id == 1 before $page == index is because the $page == index && $id == 1 statement has the same variables as $page == index so that if it wasn't before it would show the text you put in there and also the text thats in $page == index but this way it doesn't.
hope this helps
smardy
#11
Posted 05 May 2005 - 10:00 AM
#12
Posted 05 May 2005 - 04:23 PM
#13
Posted 05 May 2005 - 05:35 PM
dEcade
#14
Posted 07 May 2005 - 06:50 AM
SELECT * from DOWNLOADS where id='$downloadid'
#15
Posted 07 May 2005 - 07:23 AM
#16
Posted 07 May 2005 - 04:46 PM
<?php
if($page == index && $id == '1'){
echo 'this is if you put in ?page=index&id=1';
}
elseif($page == index){
echo 'This is if you put ?page=index';
}
elseif(!$page){
echo ' this is with nothing typed in';
}
?>
dEcade
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
