0
<?php $picNumberSlide = "<div id='slidenumber'></div>" ;?>

Num Print

<div id="slidenumber"></div> -> (Picture slide number)

Link

<a href="share?picNum=<?php echo $picNumberSlide;?>">

Not work.

<div id='slidenumber'></div> slide number of the screen writes. I intended to write inside the URL's

How i can do? Thank you! (i sorry for Eng)

2 Answers 2

1
<?php $picNumberSlide = "<div id='slidenumber'></div>" ;?>

The above defines the $picNumberSlide variable as a div.

<a href="share?picNum=<?php echo $picNumberSlide;">

Here you are placing a div inside the href of an anchor, that will never work.

You need to assign the $picNumberSlide variable only the number you wish to use.

Then using

<a href="share?picNum=<?php echo $picNumberSlide; ?>">

will work.

$picNumberSlide should only = a number

Sign up to request clarification or add additional context in comments.

3 Comments

You forgot to close the php tag.
True. Edited. I was just copy/pasting.
Thank you! Results (written in screen); <a href="share?picNum=<div id='slidenumber'></div>" The required number but the text is written.
0

Change <a href="share?picNum=<?php echo $picNumberSlide;">

To <a href="share?picNum=<?php echo $picNumberSlide;?>">

(You were missing the closing tag for php)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.