Jump to content

Passar Dados


Recommended Posts

Boas gostava de poder fazer uma coisa que e passar dados dentro de um echo para outra página



///////////////busca do valor para limites e guardar em variavel/////////
		$sql = "SELECT * FROM `config` ";

		while ($registo=mysql_fetch_array($result))
		//echo "$reg";


//////////////Selecçao com limites/////////////////////
		//echo "$var_user<br>";		
		$sql = "SELECT * FROM dados WHERE dados.utilizador LIKE \"$var_user\" LIMIT 0, $reg ;";

		echo "<table align=left border=0 >";
		echo "<tr><td>Nº</td><td>Nome da listagem</td><td>Ficheiro</td><td>Descrição</td><td>Tamanho</td><td>Data de upload</td><td>Download</td><td>Eliminar</td><td>Ver Grande</td></tr>";
		while ($registo=mysql_fetch_array($result))
		$file_pre="$link$fich";//// Passar para include já com imagem
		 $file_down= "$link$nome--$fich.zip";

		 ////////img ao passar por cima
		 $image_on = "$link$fich_img";
		 $image_off = "";

//echo "<img src='/images/'.$image_on.' onmouseover='this.src=\''.$image_off.'\';' onmouseout='this.src=\''.$image_on.'\';'/>";

		echo"<tr><td> <hr> </td><td> <hr> </td><td> <hr> </td><td> <hr> </td><td> <hr> </td><td> <hr> </td><td> <hr> </td><td> <hr> </td><td> <hr> </td></tr>";
																																										///Download com img                    										            														 ///Eliminar com IMG														/////Preview em img
		echo"<tr><td>$id</td><td><li><div class='mini'>$nome</div><img src='$image_on' class='pic'  /></li></td><td>$fich</td><td>$desc</td><td>$tam KB</td><td>$dat</td><td><a  href='$file_down' target=''><img src='.\IMG\save.gif' align='right'></a></td></img><td><a target='_blank' href=''><img src='.\IMG\del.gif' align='right'></img></a></td><td><a target='_blank' Href='$image_on'><img src='.\IMG\preview.gif' align='right'></a></td></tr>";

		//header("Location: '$link'");
		//echo "<td align='center'><a href=\"pastas_s.php">comentar</td>;
		//echo "<tr align='center'></tr>";



Na parte [glow=red,2,300]<td><a target='_blank' href=''><img src='.\IMG\del.gif' align='right'></img></a></td>[/glow] quero buscar o ID do ficheiro "$ID" e poder mandalo pa outra página para poder fazer o delete...

Link to comment
Share on other sites

Mandas por get:

echo '<a href="pagina.php?id='.$id.'" target="_blank">';

“There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.”

-- Tony Hoare

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.