Solved

Need help with PHP with href not working.

Posted on 2009-07-09
8
185 Views
Last Modified: 2012-05-07
The Read More link is not working with the commneted code to Read More.  However, I took the print out of $newLink and subsitute that for $newLink in the commented code of ReadMore and that Link works just fine.  Why is that so?  Thanks.
echo "Event link is " .$newLink;

					  //echo "<li><span class='date'>" . $newDate ."</span><br/><i>" .$event->title. "</i><br/><a href='http://www.google.com/calendar/hosted/labctsi.org/event?eid=bmFzZnF0dTFvbjA3MzZycnRuaTNnYmo1YjAgY2Jpc0BsYWJjdHNpLm9yZw'>Read More</a></li>";

					  

					  echo "<li><span class='date'>" . $newDate ."</span><br/><i>" .$event->title. "</i><br/><a href='".$newlink."'>Read More</a></li>";

Open in new window

0
Comment
Question by:lapucca
  • 3
  • 3
  • 2
8 Comments
 
LVL 12

Expert Comment

by:Chad Haney
ID: 24818038
0
 

Author Comment

by:lapucca
ID: 24818107
Weird!  It shows '', two single quote.  And I notice there is an extra </li>.  What's going on here?
0
 

Author Comment

by:lapucca
ID: 24818112
Event link is http://www.google.com/calendar/hosted/labctsi.org/event?eid=Y2NqMXZwZjY2aDBqYjlrMXFudmZvY3Bic2sgY2Jpc0BsYWJjdHNpLm9yZw<li><span class='date'>July 31, 2009</span><br/><i>OFF</i><br/><a href=''>Read More</a></li>      </li>

</ul>
                        
0
 
LVL 12

Accepted Solution

by:
Chad Haney earned 500 total points
ID: 24818119
Change $newlink
to $newLink
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 12

Expert Comment

by:Chad Haney
ID: 24818125
Not sure about your second </li>, cant see anything that would be causing that.
0
 

Author Closing Comment

by:lapucca
ID: 31601814
Thank you.  That fixed the problem.  I'
0
 
LVL 14

Expert Comment

by:profya
ID: 24818339
They are different variables, the l is big then samll:
$newLink does not equal $newlink
0
 
LVL 14

Expert Comment

by:profya
ID: 24818351
This should work:
echo "<li><span class='date'>" . $newDate ."</span><br/><i>" .$event->title. "</i><br/><a href='".$newLink."'>Read More</a></li>";

Open in new window

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Keep getting 503 on Curl request 6 30
PHP Healthcheck 2 81
xampp tool 12 23
Apply tab index in forms 6 33
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now