Jump to content

[SOLVED] save hyperlink in text help


Aireplay

Recommended Posts

Hi, I'm new in php. Hope you guy can help me out.

 

this is my form.php page

 

<form name="form1" method="post" action="process.php">

  <fieldset>

  <p align="center" class="txt">HyperLink<br>

    <input name="linkdata" type="text" size="36" class="txtbox">

    <input type="submit" name="Submit" value="Submit" class="button">

    <br>

  </p>

  </fieldset>

</form>

 

and then this is my process.php page

 

<?php

 

$linkdata = ($_POST['linkdata']);

 

$myFile = "test.txt";

$fh = fopen($myFile, 'a') or die("can't open file");

$stringData = "$linkdata";

fwrite($fh, $stringData);

fclose($fh);

 

?>

 

This is my reciprocal link project, when i submit a hyperlink code 

<a href="http://www.test.com">Test</a> it will store

<a href=\"http://www.test.com\">Test</a> instead of

<a href="http://www.test.com"> to my test.txt. How to overcome this?

 

Link to comment
https://forums.phpfreaks.com/topic/142134-solved-save-hyperlink-in-text-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

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.