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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:37:56+00:00 2026-06-12T18:37:56+00:00

I am having a problem where a user is able to submit an event

  • 0

I am having a problem where a user is able to submit an event to a calender but I cannot get them redirected back to the original page. I have tried using:

  header("Location: http://localhost/Project/View/Home.php");
  exit;

But I am getting a message This webpage has a redirect loop

HTML – Home.php

<!DOCTYPE html> 
<html lang="en"> 
  <head> 
    <meta charset="utf-8" /> 
    <link rel="stylesheet" href="Common.css" />
    <script src="jquery.js"></script>
    <script type="text/javascript" src="functions.js"></script>
    <!--Includes HTML5 Shiv for all versions of IE to solve compatability issues--> 
    <!-- <title></title>-->
<?php include '../Controller/Cal.php'?>
  </head>
  <body>
    <form action="../Controller/Cal.php" method="post">
      Content: <input type="text" name="Content" />
      <input type="submit" />
    </form>
    <header>
    <iframe src="https://www.google.com/calendar/embed?src=dnavechicleservices%40gmail.com&ctz=Europe/London" 
    style="border: 0" width="1000" height="600" frameborder="0" scrolling="no"></iframe>
    </header>
  </body>
</html>

PHP – Cal.php

<?php 
  $path = '/opt/lampp/htdocs/Project/ZendGdata-1.12.0/library';
  $oldPath = set_include_path(get_include_path() . PATH_SEPARATOR . $path);
  require_once 'Zend/Loader.php';
  Zend_Loader::loadClass('Zend_Gdata');
  Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
  Zend_Loader::loadClass('Zend_Gdata_Calendar');
  // User whose calendars you want to access
  $user = 'email@gmail.com';
  $pass = 'password';
  $serviceName = Zend_Gdata_Calendar::AUTH_SERVICE_NAME; // predefined service name for calendar
  $client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $serviceName);
  $service = new Zend_Gdata_Calendar($client);
  // Create a new event object using calendar service's factory method.
  // We will then set different attributes of event in this object.
  $event= $service->newEventEntry();
  // Create a new title instance and set it in the event
  $event->title = $service->newTitle("Service");
  $event->content = $service->newContent(isset($_POST["Content"]));
  // Create an object of When and set start and end datetime for the event
  $when = $service->newWhen();
  // Set start and end times in RFC3339 (http://www.ietf.org/rfc/rfc3339.txt)
  $when->startTime = "2012-10-20T16:30:00.000+05:30"; // 8th July 2010, 4:30 pm (+5:30 GMT)
  $when->endTime = "2012-10-20T17:30:00.000+05:30"; // 8th July 2010, 5:30 pm (+5:30 GMT)
  // Set the when attribute for the event
  $event->when = array($when);
  // Create the event on google server
  $newEvent = $service->insertEvent($event);
  // URI of the new event which can be saved locally for later use
  $eventUri = $newEvent->id->text;
  header("Location: http://localhost/Project/View/Home.php");
  exit;
?>
  • 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-12T18:37:57+00:00Added an answer on June 12, 2026 at 6:37 pm

    it looks like the cause is

    <?php include '../Controller/Cal.php'?>
    

    in your home.php

    You need to put a conditional around your header redirect.

    You can use:

    if(isset($_POST['Content']))
        header("Location: http://localhost/Project/View/Home.php");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having a problem where a user's access tokens will expire, but the session
I am having problem saving additional information about each user automatically when a new
Hello I am a new user to Python and I am having problem doing
I'm having a problem dropping a temporary table. The user account does not have
I'm having a problem with good ol' bdeadmin.exe in Vista. First, let's get the
I am having a problem with a form submitted in MVC. it is able
I'm having problem with going from mobile page to main page implemented in Joomla
I having problem with file download, I am able to download file in emulator
I am having problem loading data into Nested datagrid. When the user clicks on
I'm having a problem setting up an event on a form. Here's the setup:

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.