Jump to content

Append Data on post


enahs

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/89206-append-data-on-post/
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.