enahs Posted February 3, 2008 Share Posted February 3, 2008 Hi, I am very new to PHP. I am trying to modify http://www.freephpdirectoryscript.com/ to do what I want. What I want, is when the user types in the URL and hit submits, it appends something at the beginning of the URL. Example, this is not what I want, but it will demonstrated. Pretend the URL the user enters is: "http://phphelp.com". I want the script to save it in the database as: "http://www.google.com/search?q=http://phphelp.com" Here is the code from the submit section of the script: <P>Type the new page data:<P> <FORM METHOD="post" ACTION="admin_edit_page_add.php"> <INPUT TYPE="text" NAME="url" VALUE="<?php if ($url){ echo parse_output($url); }else{ echo 'http://'; }?>" MAXLENGTH=300> Url<BR> <INPUT TYPE="text" NAME="title" VALUE="<?php echo parse_output($title)?>" MAXLENGTH=100> Title (5-100 characters)<BR> <INPUT TYPE="text" NAME="description" VALUE="<?php echo parse_output($description)?>" MAXLENGTH=200> Description (0-200 characters)<BR> <INPUT TYPE="text" NAME="keywords" VALUE="<?php echo parse_output($keywords)?>" MAXLENGTH=200> Keywords (0-200 characters)<BR> <INPUT TYPE="submit" VALUE="Submit" CLASS="BUTTON"> <INPUT TYPE="hidden" NAME="c" VALUE="<?php echo $c?>"> </FORM> I do not know if it should be done there, or somewhere else? As it would be nice to not have to do anything to the MySQL database, and just have it send the correct information. Quote Link to comment Share on other sites More sharing options...
trq Posted February 3, 2008 Share Posted February 3, 2008 It should probably be done in admin_edit_page_add.php, or better still, not when you save the data to the database, but when you retrieve it again. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.