<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Passare variabile tramite header( ), si può?]]></title><description><![CDATA[<p dir="auto">Ciao, vorrei passare una variabile tramite la funzione header () ma non so se sia possibile.</p>
<p dir="auto">Con il codice che segue funziona tutto bene, con redirect dopo 5 secondi...</p>
<pre><code class="language-html">&lt;html&gt;
&lt;head&gt;&lt;/head&gt;
&lt;body&gt;
&lt;p&gt; Testo di prova&lt;/p&gt;
&lt;?php
$custom = 'ciao';
 header("refresh:5;url=singola.php");
?&gt;
&lt;/body&gt;
&lt;/htm&gt;
</code></pre>
<p dir="auto">ma se aggiungo una query string mi restituisce pagina bianca..</p>
<pre><code class="language-html">&lt;html&gt;
&lt;head&gt;&lt;/head&gt;
&lt;body&gt;
&lt;p&gt; Testo di prova&lt;/p&gt;
&lt;?php
$custom = 'ciao';
 header("refresh:5;url=singola.php?id=$custom");
?&gt;
&lt;/body&gt;
&lt;/htm&gt;
</code></pre>
<p dir="auto">probabilmente header() non accetta quel tipo di stringa ma la cosa che non capisco è perchè restituisce la pagina bianca anziché un errore.<br />
Soluzioni?</p>
]]></description><link>https://dev.connect.gt/topic/206794/passare-variabile-tramite-header-si-può</link><generator>RSS for Node</generator><lastBuildDate>Fri, 27 Nov 2026 11:42:00 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/206794.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 13 Oct 2014 10:43:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Passare variabile tramite header( ), si può? on Sun, 26 Oct 2014 16:55:10 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto"><strong>PietroR</strong></p>
<p dir="auto">Ciao<br />
se provi a scrivere la riga dell'header in questo modo</p>
<pre><code>[COLOR=#0000BB][FONT=arial]header[/FONT][/COLOR][COLOR=#007700][FONT=arial]([/FONT][/COLOR][COLOR=#DD0000][FONT=arial]'refresh:5;Location: singola.php?id=[/FONT][/COLOR][FONT=arial][COLOR=#DD0000]' [/COLOR][COLOR=#007700]. [/COLOR][COLOR=#0000BB]$custom[/COLOR][COLOR=#007700]);[/COLOR]
[/FONT]
</code></pre>
<p dir="auto">funziona?</p>
</blockquote>
<p dir="auto">Ottimo, così funziona anche se al posto di "Location" gli ho lasciato "url" (ma magari funziona anche con "Location", non ho provato).<br />
Scusate il ritardo nella risposta.</p>
]]></description><link>https://dev.connect.gt/post/1175460</link><guid isPermaLink="true">https://dev.connect.gt/post/1175460</guid><dc:creator><![CDATA[oslino]]></dc:creator><pubDate>Sun, 26 Oct 2014 16:55:10 GMT</pubDate></item><item><title><![CDATA[Reply to Passare variabile tramite header( ), si può? on Thu, 16 Oct 2014 12:53:04 GMT]]></title><description><![CDATA[<p dir="auto">Se ti restituisce una pagina bianca, il più delle volte è un errore lato server. Controlla nei log (error-log).</p>
<p dir="auto">M.</p>
]]></description><link>https://dev.connect.gt/post/1175438</link><guid isPermaLink="true">https://dev.connect.gt/post/1175438</guid><dc:creator><![CDATA[ziobudda]]></dc:creator><pubDate>Thu, 16 Oct 2014 12:53:04 GMT</pubDate></item><item><title><![CDATA[Reply to Passare variabile tramite header( ), si può? on Mon, 13 Oct 2014 15:45:39 GMT]]></title><description><![CDATA[<p dir="auto">Ciao<br />
se provi a scrivere la riga dell'header in questo modo</p>
<pre><code>[COLOR=#007700][FONT=arial]  [/FONT][/COLOR][COLOR=#0000BB][FONT=arial]header[/FONT][/COLOR][COLOR=#007700][FONT=arial]([/FONT][/COLOR][COLOR=#DD0000][FONT=arial]'refresh:5;Location: singola.php?id=[/FONT][/COLOR][FONT=arial][COLOR=#DD0000]' [/COLOR][COLOR=#007700]. [/COLOR][COLOR=#0000BB]$custom[/COLOR][COLOR=#007700]);[/COLOR]
[/FONT]
</code></pre>
<p dir="auto">funziona?</p>
]]></description><link>https://dev.connect.gt/post/1175439</link><guid isPermaLink="true">https://dev.connect.gt/post/1175439</guid><dc:creator><![CDATA[pietror]]></dc:creator><pubDate>Mon, 13 Oct 2014 15:45:39 GMT</pubDate></item></channel></rss>