Skip to main content

Greg McVerry

Update on @IndieWebCamp Hack Day Proect-The Guestbook

2 min read

Still working on the Guestbook Project.This didn't work

<?php
 
$var1 = $_POST['user_name'];
$var2 = $_POST['user_text'];
$var3 = $_POST['user_instagram'];
$var4 = $_POST['user_twitter'];
$var5 = $_POST['user_email'];
$var6 = $_POST['user_msg'];

$fileHandle = fopen("myDataFile", 'w');
fwrite($fileHandle, $var1);
fwrite($fileHandle, $var2);
fwrite($fileHandle, $var3);
fwrite($fileHandle, $var4);
fwrite($fileHandle, $var5);
fwrite($fileHandle, $var6);
fclose($fileHandle);
?>

<?php
<div class="h-entry"
    <p class="dt-published dates">
    echo "<time class="dt-published" datetime=". date("Y-m-d") ."> date("Y-m-d") .</time>"
    </p>
  <ul class="h-card deets">
    echo <li class="p-author">" . var1 . "</li>
    echo <li><a href="mailto:". var5 . ""></a>". var5 ."</li>
    echo <li><a class="u-url" href="". var2 . "">". var2 . "</a></li>
    echo <li><a class="u-url"  href="https://instagram.com/". var3 . "">". var3 . "</a></li>
    echo <li><a class="u-url"  href="https://twitter.com/". var4 . "">". var4 . "</a></li>
  </ul>
    <p class="p-content notes">
    echo ". var6 . "
</p>
</div>
?>

Back to YouTube. I am able to save the data not sure what I did wrong displaying it.

CLMOOC

Prev | Home | Join | ? | Next