Hi everyone,
i embedded a shiny app in a simple html page as an iframe. The html page has a password field and i use a variable $loggedin in php to store the login status. Is there a simple way to use this variable in shiny? I figure that i probably need to use javascript?
the php file looks like this:
<html>
<body>
Hello world.
<?php
$loggedin = TRUE;
echo $loggedin;
?>
</body>
</html>
ui.r
shinyUI(pageWithSidebar(
# Application title
headerPanel("Hello Shiny!"),
# Sidebar with a slider input for number of observations
sidebarPanel(
sliderInput("obs",
"Number of observations:",
min = 1,
max = 1000,
value = 500)
),
mainPanel(
plotOutput("distPlot")
)
))
server.r
library(shiny)
shinyServer(function(input, output) {
output$distPlot <- renderPlot({
plot(1) # here i want a ifelse with the php-variable
})
})