[PHP] Re: variable in e-mail
Hi, Sorry, but we are not able to help you without any code from you. Greetz Kristin Schesonka Christian Tischler <[EMAIL PROTECTED]> schrieb in im Newsbeitrag: [EMAIL PROTECTED] > I would like to use a form in a html page to pass the variables to a php > page, which sends an mail including these variables. > > All I get in the mail though is a 1 rather than the string that I put into > the form??? > > Can anyone help please! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: javascript & php
Hi Roman, I'm not sure if I understand what you want to do - but if you try to set your PHP-Variable with JavaScript it couldn't work. JavaScript is Clientside interpreted and PHP is Serverside interpreted, that means your PHP-Code is done before the JavaScript-Code. So the Webserver reads your $color Variable and sees that it is set to "<!--document.write(screen.colorDepth) file://-->" This value is obviously not in your database. Then the Webserver sends the resulting HTML to your browser. > $color = "<!-- >document.write(screen.colorDepth) >file://--> >"; > > $query = mysql_query("select id from color where color = '$color' "); > $a = mysql_num_rows($query); Greetings Kristin Schesonka -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Carrying a variable
Hi :) It's really simpel //$Unit = ($_GET['Unit']); //... //echo ""; You use "post" as method and then you want to read your value with $_GET - that couldnt't work - you must use $_POST. ->$Unit = ($_POST['Unit']); Greetings from Germany Kristin Schesonka > I am using PHP 4.3.0 > The way that I usually carry variables from one page to another is > $Unit = ($_GET['Unit']); > > This is the page that is referencing it! > echo ""; > $DBName = "SIGO"; > $table1 = "sigo"; > include 'drop.php'; > > $db = mysql_connect("$DBhost","$DBuser","$DBpass") or die("Problem > connecting"); > mysql_select_db("$DBName") or die("Problem selecting database"); > $query = "SELECT distinct (Unit) FROM $table1"; > $result = mysql_query($query) or die ("Query failed"); > //let's get the number of rows in our result so we can use it in a for loop > $numofrows = mysql_num_rows($result); > echo ""; > echo ""; > echo ""; > for($i = 0; $i < $numofrows; $i++) { > $row = mysql_fetch_array($result); //get a row from our result set > echo "".$row['Unit']."\n"; > } > echo ""; > echo ""; > echo ""; > echo ""; > ?> > > Oviously this isn't working.any clues as to why I can't carry the > variable? > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Fputs problem
You'll have to quote the $ like $string="blablabla \$myvariable blablabla\n"; or you put your string in ' instead of " then you only have to quote the ' if you want to use it in your string. For more information look http://www.php.net/manual/en/language.types.string.php#language.types.string .syntax.single Greetings Kristin Schesonka "Steve Jackson" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > I don't know if this is possible but... > > I want to generate a PHP file on the fly. I am trying to use fputs but I > have a problem in that it doesn't print a variable name in the string. > Here is my code: > > Formid is being passed into the string great which is what I want but > how do I get the string to write the variable names in this code? Are > there any rules I need to follow to get the whole file to print out? If > so what? And what should I be looking for in the manual? Fputs isn't > helping much. > > function generate_page($formid, $pagename) > { > // Give the function the string to be generated including formid passed > from > // previous form > $string = " > //\n > // Written by Steve Jackson. Copyright and all rights reserved Webpage > 2003.//\n > /functions here all included in > output_fns.php\n > > //\n > // include the files from output fns to get functions which design the > page\n > include ('output_fns.php');\n > db_connect();\n > $query = \"select * from content where PageID='$formid'\";\n > $result = mysql_query($query) or die(\"Error: Query failure > with$query\".mysql_error());\n > while ($array = mysql_fetch_array($result))\n > {\n > $HeadTitle = \"{$array["HeadTitle"]}\"; \n > $PageTitle = \"{$array["Title"]}\"; \n > $BodyText = \"{$array["BodyText"]}\";\n > $Picture1 = \"{$array["PictureOne"]}\";\n > $Picture2 = \"{$array["PictureTwo"]}\";\n > $CatID = \"{$array["CatID"]}\";\n > }\n > // carry the variable head title in the page and do the page header\n > do_html_header($HeadTitle);\n > // carry variables into do_html_index() function in output_fns.\n > // Page title = The headline of the page\n > // Body text = The text body, can include html commands.\n > // Picture 1 = picture or graphic that appears above the title if > required.\n > // Picture 2 = Picture that appears right hand side on the basic > output_fns\n > // CatID = Category which is used for determining which links appear > on each page\n > // Section name = Allows you to specify extra functions to > output_fns.php to be unique to the page (requires hard coding)\n > do_html_index($PageTitle, $BodyText, $Picture1, $Picture2, $CatID, > $SECTION_NAME);\n > // put the page footer in position\n > do_html_footer();\n > ?>\n"; > $filename = 'test.txt'; > $fp = fopen($filename, "a"); > $write = fputs($fp, $string); > fclose($fp); > } > generate_page($formid, $pagename); > > Steve Jackson > Web Development and Marketing Manager > Viola Systems Ltd. > http://www.violasystems.com > [EMAIL PROTECTED] > Mobile +358 50 343 5159 > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: passthru() problem
I don't know much about System or passthru - but doesn't it have to be something like: passthru(ftpwho -v, &$return_var); echo $return_var; Because it is a reference Parameter und without the "&" the function can't put the value into $return_var. Greetings Kristin Schesonka > > passthru(ftpwho -v, $return_var); > echo $return_var; > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Form 2 PDF 2 Form
Hmm, i don't know if you want it that way, but i got the idea of making the stuff personalized . . . I mean the user logges on and gets an Userid - then you always save your data with the Userid, so you can look which entries in your DB belong to this user and the user can start again at a different stage . . . . Greetings Kristin Schesonka -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Form 2 PDF 2 Form
Hi :) I'm actually working on an Multipart-Form and i'm saving all data during the "Fill-In" process in a Session - then, at the end, i save the whole sessiondata in my table. That will solve the connection-problems i hope . . . If I am wrong, please correct me :) Greetings from Germany Kristin Schesonka -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php