dunque scrivo la prima parte del codice:Originariamente inviato da giorgiodp
![]()
grazie infinite per la cura che ti sei preso di me con questo script..
molto molto gentile, lo provo subito.
![]()
step1foto.php
<?php
session_start();
?>
<html>
<head>
<body bgcolor="black">
<p align="center">
<body onLoad="setTimeout('document.step1.submit();', 3000);">
<form name="step1" action="step1.php" method="get">
<title>Step1foto</title>
</head>
<?php
include "config.php";
$query = mysql_query("SELECT id_user, date FROM messaggi ORDER BY date DESC limit 1");
while($riga = mysql_fetch_assoc($query))
{
$id_user = $riga["id_user"];
}
$id_cartella = substr(date('i'), -1, 1);
if(!isset($_SESSION["id_cartella"]))
$_SESSION["id_cartella"] = $id_cartella;
$cartella = "fotos/".$id_cartella;
$image_src ="fotos/" . $id_cartella . "fotos/"."1" . ".jpg";
echo "<img src=\"$image_src\">";
?>
<?php
$_SESSION['user'] = $_GET['user'];
$_SESSION['gender'] = $_GET['gender'];
$_SESSION['year'] = $_GET['year'];
$_SESSION['month'] = $_GET['month'];
$_SESSION['day'] = $_GET['day'];
$_SESSION['country'] = $_GET['country'];
?>
</body>
</html>
step1.php
<?php
session_start();
$id_cartella = substr(date('i'), -1, 1);
$_SESSION["id_cartella"] = $id_cartella;
?>
<html>
<head>
<title>Step1</title>
</head>
<body onLoad="setTimeout('document.step2.submit();', 5000);">
<form name="step2" action="step2.php" method="get">
<fieldset>
<font size="+4"> <legend> test arousal photo1</legend>
<font size="+1"> <input id="radio1" name="test_arousal_photo1" type="radio" value="-2" /><label for="radio1">it relaxes me a lot </label>
<input id="radio2" name="test_arousal_photo1" type="radio" value="-1" /><label for="radio2">it relaxes me something</label>
<input id="radio3" name="test_arousal_photo1" type="radio" value="0" /><label for="radio3">neither it relaxes me neither it activates me</label>
<input id="radio4" name="test_arousal_photo1" type="radio" value="1" /><label for="radio4">it activates me something</label>
<input id="radio5" name="test_arousal_photo1" type="radio" value="2" /> <label for="radio5">it activates me a lot</label></p>
</fieldset>
</form>
</body>
</html>
step2.php
<?php
session_start();
$id_cartella = substr(date('i'), -1, 1);
$_SESSION["id_cartella"] = $id_cartella;
?>
<html>
<head>
<title>Step1</title>
</head>
<body onLoad="setTimeout('document.step2.submit();', 5000);">
<form name="step2" action="step2.php" method="get">
<fieldset>
<font size="+4"> <legend> test arousal photo1</legend>
<font size="+1"> <input id="radio1" name="test_arousal_photo1" type="radio" value="-2" /><label for="radio1">it relaxes me a lot </label>
<input id="radio2" name="test_arousal_photo1" type="radio" value="-1" /><label for="radio2">it relaxes me something</label>
<input id="radio3" name="test_arousal_photo1" type="radio" value="0" /><label for="radio3">neither it relaxes me neither it activates me</label>
<input id="radio4" name="test_arousal_photo1" type="radio" value="1" /><label for="radio4">it activates me something</label>
<input id="radio5" name="test_arousal_photo1" type="radio" value="2" /> <label for="radio5">it activates me a lot</label></p>
</fieldset>
</form>
</body>
</html>
step2foto.php
<?php
session_start();
$id_cartella = substr(date('i'), -1, 1);
$_SESSION["id_cartella"] = $id_cartella;
?>
<html>
<head>
<body bgcolor="black">
<p align="center">
<title>Step2foto</title>
</head>
<body onLoad="setTimeout('document.step2_1.submit();', 3000);">
<form name="step2_1" action="step2_1.php" method="get">
<body bgcolor="black">
<p align="center">
<?php
include "config.php";
$query = mysql_query("SELECT id_user, date FROM messaggi ORDER BY date DESC limit 1");
while($riga = mysql_fetch_assoc($query))
{
$id_user = $riga['id_user'];
}
$id_cartella = substr(date('i'), -1, 1);
if(!isset($_SESSION["id_cartella"]))
$_SESSION["id_cartella"] = $id_cartella;
$cartella = "fotos/".$id_cartella ;
$image_src ="fotos/" . $id_cartella . "fotos/"."2" . ".jpg";
echo "<img src=\"$image_src\">";
?>
ha ancora lo stesso problema che mi agiorna $id_cartella e mi passa alle foto con il numero successivo.
ohibo'