Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8574511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:29:26+00:00 2026-06-11T19:29:26+00:00

Dreamweaver is reporting an error in the 3rd line of the following code: if

  • 0

Dreamweaver is reporting an error in the 3rd line of the following code:

if (isset($_POST['sitename']))
    {
        $query = "INSERT INTO dllist (name, url, pr) VALUES ( "$_REQUEST['sitename'], $_REQUEST['siteurl'], $_REQUEST['pagerank']" )";
        $result = mysql_query($query) 
            or die("Query Failed".mysql_error());

        echo "<br />Website Has been added<br />";

    }

Also, when running the code in my browser the following error is reported

Parse error: syntax error, unexpected '$_REQUEST' (T_VARIABLE)

Can anybody tell me where the mistake is? I shall really be grateful.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T19:29:27+00:00Added an answer on June 11, 2026 at 7:29 pm

    The commas (and the fact your missing the containers around your values (e.g. single quotes)), it should be:

            $query = "INSERT INTO dllist (name, url, pr) VALUES ('".$_REQUEST['sitename']."', '".$_REQUEST['siteurl']."', '".$_REQUEST['pagerank']."')";
    

    Although this is still bad practice, and it has no SQL Injection protection.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am using the dreamweaver cs4 insert into function to manage multiple forms on
In the following php script Dreamweaver is giving me a syntax error every time
I am using Dreamweaver CS6 and I have attached the code below. I updated
Dreamweaver gives an error. What's the right syntax? After the first .animate({left: '-=980'}, 550,
I have Dreamweaver CS5, and used the Insert FLV function to generate a flash
The script works however in Dreamweaver, I keep getting a syntax error. I'm not
I am using DreamWeaver to code xHtml docs. in the program the code is
OK Dreamweaver and my local host server keeping saying that their is a error
I'm using Dreamweaver on a file that has about 30 instances the following: 'portfolio_bg'
I notice Dreamweaver creates a name attribute automatically with the same value as id

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.