Jump to content

Consulta a bd


Recommended Posts


Alguém sabe como faço para apanhar o "valor" no select que esta dentro do alert.

Visto k o "valor" bem do javascript...

Eu kero por a mostrar no alert o que vai dar do select.

Assim nao esta a funcionar mostra o seguinte erro: Parse error: syntax error, unexpected ';' in C:\xampp\htdocs\skysigma\gestao\pat.php on line 188 que é a linha do select

<script type="text/javascript">
//evento quando clicar no link com id="pegar-valor"
//pegamos o valor do input
var valor = $("input[name=suggest]").val();
//mostramos o valor com alert()
alert(<?php $sql=mysql_query("select * from tab_pat where ID_PAT='"?>document.writeln(valor)"'"<?php );
echo $linhas['ID_PAT'];

Alguém que me dê uma dica para eu fazer isto pff.....

Edited by Programar
GeSHi, removi formatacão, mudei para quadro javascript
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.