Hello,

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

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

Thanks before,
Davy

Member Avatar for diafol
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.

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

Member Avatar for diafol

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.