SEO Scripts
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   SEO Chat ForumsOtherSEO Scripts

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread SEO Chat Forums Sponsor:
  #1  
Old October 8th, 2003, 04:01 PM
pixel pixel is offline
Junior Member
SEO Chat Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 1 pixel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
select

I would like to save on HD the selected value in the select in this form.
Someone gave me the solution of $puntatore_file but it didn't go
because I can't set the variable $sel which must take values from
$CODICE and $DESCRIZIONE every time someone selects a value in this form
I post the code :
<?php
include("dati.txt");
$link = mysql_connect ("$db_host")
or die ("Non riesco a connettermi al server <b>$db_host</b><br>");
$table = "`aree omogenee`";
mysql_connect($db_host) or die("Impossibile collegarsi al server");
@mysql_select_db("$database") or die("Impossibile connettersi al database $database");
$sqlquery = "SELECT * FROM $table";
$result = mysql_query($sqlquery);
$number = mysql_num_rows($result);
$i = 0;
if ($number < 1) {
print "<CENTER><P>Non ci sono risultati nella tua ricerca</CENTER>";
}
else {
echo"
<HTML>
<HEAD>
<STYLE TYPE=\"text/css\">
.select {
font-family: Arial;
color: #000000;
font-size: 10px;
font-weight: bold;
border: 1px solid yellow;
background-color: #c0ffc0;
}
</STYLE>
<TITLE>Maschera AREE OMOGENEE
</TITLE>
</HEAD>
<BODY>
<FORM METHOD=post ACTION=\"\">
<INPUT TYPE=hidden NAME=formname VALUE=\"form test\">
<INPUT TYPE=hidden NAME=mailform_url VALUE=\"\">
<FONT face=arial size=5 color=#000000>
<CENTER>
<TABLE border=2 width=450 bgcolor=#00c000 bordercolor=#000000>
<TR><TD>
<TABLE border=0 width=450 bgcolor=#00c000>
<TR><TD height=30></TD></TR>
<TR><TD align=center><font face=arial size=4 color=#ff0000>
Seleziona un valore dalla tabella</FONT><BR>
<FONT face=arial size=4 color=#ff0000>
<B>AREE OMOGENEE</B></FONT><BR>
</TD></TR>
<TR><TD height=10></TD></TR>
<TR><TD align=center>
<SELECT class=\"select\" size=1 cols=10 name=visualizza_dati>
<OPTION selected VALUE=nessuna>";
while ($number > $i) {
$CODICE = mysql_result($result,$i,"CODICE");
$DESCRIZIONE = mysql_result($result,$i,"DESCRIZIONE");
echo"
<OPTION value=$CODICE $DESCRIZIONE>$DESCRIZIONE<br>";
$puntatore_file = fopen("C:/report/archivio.txt", "w");
$sel="$CODICE";
$fput=fputs($puntatore_file,$sel);
fclose($puntatore_file);
$i++;
}
}
echo"
</SELECT></td></tr> ";
echo"
<TR><TD align=center height=30></TD></TR>
<TR><TD align=center>
<INPUT TYPE=\"submit\" VALUE=\"Salva\" name=\"Submit\"></TD></TR>
<TR><TD height=30></TD></TR>
</TABLE>
</table>
</CENTER>
</FORM>
</BODY>
</HTML>"
;
?>

thanks
sorry for my english

Reply With Quote
  #2  
Old October 8th, 2003, 09:12 PM
digitalpoint's Avatar
digitalpoint digitalpoint is offline
Contributing User
SEO Chat Beginner (1000 - 1499 posts)
 
Join Date: Aug 2003
Location: San Diego • USA
Posts: 1,276 digitalpoint User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 21 m 55 sec
Reputation Power: 7
Convert it to something we can read first... you could do it by using the htmlentities function in PHP if you wanted...

http://us4.php.net/manual/en/function.htmlentities.php

- Shawn

Reply With Quote
Reply

Viewing: SEO Chat ForumsOtherSEO Scripts > select


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT