Guest User

Untitled

a guest
Jul 16th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. <script> $(function(){
  2. $(document).on('change','#codd',function(){ //detectamos el evento change
  3. var value = $(this).val();//sacamos el valor del select
  4. $('#dep').val(value);//le agregamos el valor al input (notese que el input debe tener un ID para que le caiga el valor)
  5. });
  6. });
  7.  
  8. <?php /*Este codigo nos servira para generar un numero diferente para cada ticket*/
  9. $codigo = "";
  10. $con=mysql_connect('localhost', 'root', '' );
  11. mysql_select_db('sisteman');
  12. $num=mysql_query("SELECT * FROM ordenes") or die(mysql_error());
  13. $numero_filas = mysql_num_rows($num);
  14.  
  15. $numero_filas_total=$numero_filas+1;
  16. $ido="ORD".$codigo."N".$numero_filas_total;
  17.  
  18. /*Fin codigo numero de ticket*/?>
Add Comment
Please, Sign In to add comment