Jump to content

if/then/else?


rnewman

Recommended Posts

Trying to make new web page when user ticks off a one choice of 6 options

then page adds picture of choice to a master display (of pictures) of all choices (and scales down as list gets bigger)

also a text list of options already selected is also displayed.

I don't think I need a data base because I only have 6 choices but some show up in list more than one time.

I think I can do it with if/then/else but not sure.

 

I like php and can get what I need for simple examples.

 

Thanks,

Ray

 

Link to comment
https://forums.phpfreaks.com/topic/59088-ifthenelse/
Share on other sites

I found this:

 

<?php

$theuri = $_SERVER['REQUEST_URI'];

if ( ($theuri =="/") or ($theuri =="/index.php") )

{

$itemis = "<img src=\"images/arrow.gif\" alt=\"arrow \">

<span class=\"note\"> Screen Text Here </span>";

} else {

$itemis = "<a href=\"www.yourdomain.com/index.php\">Screen Text Here </a>";

}

echo $itemis;

?>

 

which seems more useful to me but I forgot how to do selection and regenerate page.

Thanks,

Ray

 

Link to comment
https://forums.phpfreaks.com/topic/59088-ifthenelse/#findComment-293392
Share on other sites

I may have missed the point, but if you are just using static data(ie, you wont be retrieving any data from a database after the selection of a checkbox) then you might as well just use javascript to do this. If you will be quering the database based on a selection and want to change a part of your page based on the result, use AJAX.

Link to comment
https://forums.phpfreaks.com/topic/59088-ifthenelse/#findComment-293419
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.