/    Sign up×
Community /Pin to ProfileBookmark

Mini Control Panel

Hey there.
I wanted to do this in Javascript, however I think PHP may be better to use.
I need a control panel to create an image that links to a url.

It needs to have a drop down list to choose which image is going to be displayed and a text field to type in the url

Prefereably I’d like to be taken to a newly generated page that had the choses image from the dropDownMenu that when clicked it takes you to the url

the code thats actually generated has to be simple.
<a href=””><img href=””></a>
No tags or anything else.

THis is so I can copy the image from a web browser and paste it into my mail program as html. That way it just absolute links to the image and when clicked takes to a new page. Trust me, this is the only way to do what I want.

If anyone can help me make this control panel, I’m sure it will be easy, I would be very greatful.

Thank you
Niietzshe

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@niietzsheauthorSep 24.2006 — Anybody?
Copy linkTweet thisAlerts:
@crazycoderSep 24.2006 — I think javascript would work better but here try something like this:

&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /&gt;
&lt;title&gt;code generator&lt;/title&gt;
&lt;/head&gt;

&lt;body&gt;

&lt;form method="post" action="thisSameFile.php"&gt;
url: &lt;input type="text" name="url" size="40" /&gt;
img:
&lt;select name="img"&gt;
&lt;option&gt;img 1&lt;/option&gt;
&lt;option&gt;img 2&lt;/option&gt;
&lt;/select&gt;
&lt;input type="submit" name="submit" value="generate code" /&gt;
&lt;/form&gt;&lt;br /&gt;&lt;br /&gt;
&lt;?
if(isset($_POST['url']) &amp;&amp; isset($_POST['img'])) {
echo "&amp;lt;a href='" . $_POST['url'] . "'&amp;gt;&amp;lt;img src='" . $_POST['img'] . "' border='0' /&amp;gt;&amp;lt;/a&amp;gt;";
?&gt;
&lt;/body&gt;
&lt;/html&gt;


not tested
Copy linkTweet thisAlerts:
@niietzsheauthorSep 24.2006 — Thanks for that, however I get an error O_o
×

Success!

Help @niietzshe spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...