Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Comercial
    • Calculadora

0

40
Vistas
Generate links with data without database?

Can someone help me? I have a text box on my index,and for example if i input "text1" into it and hit the submit button it will be redirected on a new page where the "text1" will be displayed. But everytime i input new text on my index textbox i want to generate new unique URL and remember the data inserted into text box from index. Is there a way to do this without mysql database? Think that every time my users access that unique URL to have that "text1" inserted from index. Thank you

7 months ago · Juan Pablo Isaza
3 Respuestas
Responde la pregunta

0

hey it kind of sounds like you want to use the $_GET function

so imagine like you want the name to be Negru you can do something like

<?php echo $_GET['name'] ?>
  index.php?name="namehere"

you can change the name and it will always display the name you give

7 months ago · Juan Pablo Isaza Denunciar

0

put your data in query strings. I don't know how to do that in PHP though.

The address will look like www.yourwebsite.com/new-page?data-you-want-to-pass="value"

7 months ago · Juan Pablo Isaza Denunciar

0

Try this

<form method="post" action="send.php" id="idOfForm">
  <textarea name="msg" id="msg"></textarea>
  <input type="submit" value="Send" />
</form>
<button onclick="doPreview();">Preview</button>
<script type="text/javascript">
    function doPreview()
    {
        form=document.getElementById('idOfForm');
        form.target='_blank';
        form.action='preview.php';
        form.submit();
        form.action='send.php';
        form.target='';
    }
</script>

7 months ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos