error as a picture

hello i have a form and i wanna show the error of the form as a picture not a message.
the original code is this
if(user_save($data))
                  {
                        $message = "<span style='color:green'>Details updated</span>";
                  }

drsrs21Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Paul MacDonaldConnect With a Mentor Director, Information SystemsCommented:
Hmm.  There's no obvious reason that wouldn't work.  Maybe wrap the whole thing in a span?  Are you sure the image you want to use exists and that you're pointing to it correctly?

if(user_save($data))
                  {
                        $message = "<span><img src='whatever' /></span>";
                  }

0
 
drsrs21Author Commented:
hello
0
 
Paul MacDonaldDirector, Information SystemsCommented:
if(user_save($data))
                  {
                        $message = "<img src='whatever' />";
                  }

0
Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

 
drsrs21Author Commented:
i use that but when i modify the code the whole page doesn't load at all.
0
 
drsrs21Author Commented:
this is the modified code
if(user_save($data))
                  {
                        $message = "<img src='images/account_setting.png' alt="" />";
0
 
drsrs21Author Commented:
i checked the page again worked out thanks.
0
 
drsrs21Author Commented:
thanks
0
 
drsrs21Author Commented:
and what if i want to use both. i mean a text message showing a picture beside?
0
 
Paul MacDonaldDirector, Information SystemsCommented:
if(user_save($data))
                  {
                        $message = "<img src='whatever' /><br /><span style='color:green'>Details updated</span>";
                  }

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.