0

Hello,

How to place quote (' ') between Lesson 3 ?

define('SUCCESS_URL','add_material.php?class_name=Lesson 3');

Thanks before,
Davy

Edited by davy_yg

3
Contributors
4
Replies
31
Views
2 Years
Discussion Span
Last Post by diafol
0
define('SUCCESS_URL',"add_material.php?class_name='Lesson 3'");

Is that what you mean?
Anyway why would you want to to that for a url? Seems a bit weird.

If that is indeed what you need, I suggest reading up on some basics on quotes.

Edited by diafol

0

What are you doing with 'Lesson 3' ? If you inject this into a query without escaping, your query will fail.

0

A better url would be...

"add_material.php?class_name=Lesson-3"

No quotes, no spaces. You can convert the GET class_name by replacing all - with spaces before using. Spaces and quotes in urls are weird like I stated. Better still store the resource as Lesson-3 (or Lesson3 or Lesson_3) in the first place

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.