Ir para conteúdo
Fórum Script Brasil

Rafael Cravcenco

Membros
  • Total de itens

    2
  • Registro em

  • Última visita

Tudo que Rafael Cravcenco postou

  1. Hello, I'm a beginner and I'm still learning how to work with variables I would like to know how to make it so that when I click on the button, the variable and the text showing it increases, adding +1 to the value with each click. Can anybody help me?? My code looks like this (not sure about var_dump): <!DOCTYPE html> <html> <head> <title>Test PHP</title> </head> <body> <?php $var = 0; ?> <button onclick="<? var_dump(++$var); ?>"> click here </button> <?php echo $var ?> </body> </html>
  2. Olá, sou iniciante e ainda estou aprendendo a mexer com variáveis Queria saber como faço pra quando clicar no botão, a variável e o texto mostrando ela aumente, adicionando +1 ao valor a cada click. Alguém poderia me ajudar?? Meu código está assim (não tenho certeza sobre o var_dump) : <!DOCTYPE html> <html> <head> <title>Teste PHP</title> </head> <body> <?php $var = 0; ?> <button onclick="<? var_dump(++$var); ?>"> clique aqui </button> <?php echo $var ?> </body> </html>
×
×
  • Criar Novo...