jackr1909 Posted July 12, 2011 Share Posted July 12, 2011 hi, i want to be able to pick out a url in a processed form and convert it to a tinyURL using a service that i have, I have absolutly no idea how to do this thanks a lot, Link to comment https://forums.phpfreaks.com/topic/241787-picking-out-urls-automatically/ Share on other sites More sharing options...
infrabyte Posted July 12, 2011 Share Posted July 12, 2011 Hi, Can you give us an example of the form Link to comment https://forums.phpfreaks.com/topic/241787-picking-out-urls-automatically/#findComment-1241740 Share on other sites More sharing options...
jackr1909 Posted July 12, 2011 Author Share Posted July 12, 2011 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 Link to comment https://forums.phpfreaks.com/topic/241787-picking-out-urls-automatically/#findComment-1241744 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.