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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.