Hi Everyone, I am trying to add a php post variable to one of my output error messages.

The working error message is this -

registerError( $hint, $hint, $error_title, ' + sign not required. International dialing code not required' );

What I would like to do is to display the International Dialing Code in the error message, like +44 is not required.

I have tried

registerError( $hint, $hint, $error_title, ' "' . $dialingCode . '" sign not required. International dialing code not required' );

And Also

registerError( $hint, $hint, $error_title, ' ' . $dialingCode . ' sign not required. International dialing code not required' );

As well as

registerError( $hint, $hint, $error_title, ' $dialingCode sign not required. International dialing code not required' );

But all that is displayed is an empty space, What is it I am doing wrong...

Thanks in advance...

Recommended Answers

All 4 Replies

Well, have you assigned $dialingCode to a value? In other words, is there some place in some script that says $dialingCode = $_POST['dialingCode'];? :)

You could check the value of $dialingCode by using var_dump($dialingCode);

Yes I do have the var $dialingCode = $_POST['dialingCode'];

I have tried to wrap this around php tags, but still get a blank space...

Got it to work I just added spaces betweet each ' and . and the variable...

Thanks

Wow it should have even worked without those spaces I think :o. But glad it's working right now!

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.