> http://www.yorkshire-search.co.uk/links/add.php3

Right, I seem to have not made myself too clear so I'll try again.

Originally, the page "add.php3" was using a plain HTML template called
"add_form.html" which consisted of a simple form. If you click on the link
above and have a look at the page, everything below Add Link was how it
started off.  In the code below, it's everything after the </php> tag. Users
would just complete the form and press submit.

However, I decided instead of typing in certain fields, I wanted to autofill
the boxes so I found a PHP4 script which would grab meta-tags and embedded
it into the template.  All PHP scripts have to be within <php></php> tags as
defined in a different part of the search engine script.

My problem is that whatever method I have tried, I have not managed autofil
the forms text boxes with values from the script in a one step process.

I first tried putting the HTML form in the script but this brought parsing
errors. Next I tried keeping the form in the HTML but trying to use
value=<?....?> statement. This again brought parsing errors or the code
simply appeared in the box.

Hope that makes a bit more sense.

<table width="100%" cellpadding=3 cellspacing=1 height=23 border=0
text=#000000 link=#FFFFFF></table>

// Include the function so you can use it later in the page

// Call the MetaEngine function and assign the return value to an array
$metaInfo = MetaEngine($url);

// Array index is not numbers but names, such as:
// $metaInfo[title] is the title of the page
// $metaInfo[description] is the description of the page
// $metaInfo[keywords] is the keywords of the page

echo "

<form method=\"POST\" action=\"$PHP_SELF\">
<CENTER><font face=\"Arial\" size=\"2\"><b>Enter URL:</b></font> <input
type=\"text\" name=\"url\" size=\"25\">&#32;&#32;<input type=\"submit\"
value=\"Submit\" name=\"B1\"></CENTER><br><font face=\"Arial\"
size=\"2\"><b>1. Press the submit button and it will grab meta tags of


<input type=hidden name=title value=\"$metaInfo[title]\">
<input type=hidden name=url value=\"$url\">
<input type=hidden name=description value=\"$metaInfo[description]\">

<table border=\"0\" cellspacing=\"0\" cellpadding=\"4\" width=\"100%\">
          <td><center><input type=submit name=submit value=\"Now press this
button\" class=\"button\"></center><br><font face=\"Arial\" size=\"2\"><b>2.
If complete URL displays in box below, press the above





  <p class="ptitle">Add Link</p>
<table width="500" border="0" cellpadding="5">
    <td colspan="3">
        <font face="Arial" size="2" color="Red"><%error_msg%></font>
      <form action="add.php3" method=post>
      <input type=hidden name=pflag value=add>

       <table border="0" cellspacing="0" cellpadding="4" width="100%">
          <td><font face="Arial" size="2">Url</font></td>
          <td><input type="text" name="title" size=20 value="<?=$title?>">
          <td><font face="Arial" size="2">Title</font></td>
          <td><input type=text name=title size=40 value="<%title%>"></td>
          <td valign="top"><font face="Arial"
          <td><textarea name="description" cols="40" rows="10"
maxlength="255" wrap="virtual"><%description%></textarea></td>
          <td><font face="Arial" size="2">Category</font></td>
          <td><font face="Arial" size="2"><%category%></font></td>
          <td><font face="Arial" size="2">Contact Name</font></td>
          <td><input type=text name=contact_name size=30
          <td><font face="Arial" size="2">Email</font></td>
          <td><input type=text name=email size=30 value="<%email%>"></td>
          <td><font face="Arial" size="2">Bid</font></td>
          <td><input type=text name=bid size=10 value="<%bid%>">
          <font face="Arial" size="2" color="green">(optional)</font>

          <td><input type=submit name=submit value="Add"
class="button"><br>Once you are happy with your entries, press this


PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to