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 8813543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:52:53+00:00 2026-06-14T03:52:53+00:00

im working on php page where for call contend in same page i’ve added

  • 0

im working on php page where for call contend in same page i’ve added

<?php if (isset($cpID)) {   echo ' '; }

i’ve added in the two ” some code that work nice, but have small troubles with this code:

onClick="location.href='waiting.php?picID='.$cpID.''"

it’s give me syntax error and i not know how place it in the PHP if set, please can help me? Thanks Stew

COMPLETE CODE:

<?php
if (isset($cpID)) {
    echo '</p><button class="btn btn-large btn-block btn-success" onClick="location.href='waiting.php?picID='.$cpID.''"  type="button">Click here to upload this Cover to your Facebook Profile</button></p>';
}
?>
  • 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-14T03:52:55+00:00Added an answer on June 14, 2026 at 3:52 am

    Problem:

    echo '
    </p><button class="btn btn-large btn-block btn-success" onClick="location.href='waiting.php?picID='.$cpID.''"  type="button">Click here to upload this Cover to your Facebook Profile</button></p>
    ';
    }
    

    The problem is that your single quote for the echo is being closed by the one next to location.href=' You need to escape your single quotes.


    Solution:

    echo '
    </p><button class="btn btn-large btn-block btn-success" onClick="location.href=\'waiting.php?picID='.$cpID.'\'"  type="button">Click here to upload this Cover to your Facebook Profile</button></p>
    ';
    

    Please notice, I have escaped the single quotes with \'

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

Sidebar

Related Questions

i have tried this code to redirect a php page.but it s not working
I'm working on a PHP dynamic web page that has a <textarea> element that
I am working with php and want to have a page that has a
Iam working on Ubuntu.(Linux) I want to redirect from the page one.php to two.php,
I'm working on a PHP page that allows the user to reset their password.
I am working on a PHP application and missing some of the functionality that
What I have here is a PHP page working with the Facebook API. What
i have a dynamic php web page localhost/ctd/index.php All working good except if i
I have a jQuery dialog which loads an external php page. All is working
Working with PHP Xpath trying to quickly pull certain links within a html page.

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.