Jump to content

Picking out URL's automatically


jackr1909

Recommended Posts

Client Side

<form action="post.php">
<input type="text" name="post" placeholder="what would you like to say" size="95">
<input type="submit" value="Post">

Server Side:

 

<?php
//tinyurling code should go here
$user = $_SESSION['user']
$post = $_POST['post']
$con = mysql_connect("localhost","root","password");
if (!$con)
   {
   die('Could not connect: ' . mysql_error());
   }

mysql_select_db("post", $con);

mysql_query("INSERT INTO Persons (id, post, time, user)
VALUES ('', '$post', '', '$user')");

mysql_close($con);

header("Location: thankyou.php")
?>

 

Thanks

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.