Jump to content

rilana

Members
  • Posts

    157
  • Joined

  • Last visited

Everything posted by rilana

  1. This does not work eighter. The output is nothing and the form gives an error when sending. Please do you have any other solutions? I dont understand if (isset($_POST['sig']) ) // if form submitted, process data Does that simply ask if the previous form has send the array? <?php if (isset($_POST['sig']) ) // if form submitted, process data { $sig = $_POST['sig'] ; // get hidden form value echo $sig, ' ', myemail($sig); // get the email address } function myemail($sig) { $emails = array ( 'Herr Colin Rhyner' => 'crhyner@smartpersonal.ch', 'Frau Loan Do' => 'rila@rilana.biz', 'Frau Manuela Jau' => 'mjau@smartpersonal.ch' ); return isset($emails[$sig]) ? $emails[$sig] : 'rila@freesurf.ch'; } ?> <?php // // provide sample form data // - for test only // $a = array ('sig' => "Herr Colin Rhyner"); ?>
  2. OK sorry guyes, I thaught since I have a new problem it would be better to open a new post and put the old one on solved... sorry! I am still trying for Barand sucestion. But it doesnt seem to work... it causes an error. I will be back in a fiew minutes with more input on that... thanks for helping.
  3. thanks for your reply the output is correct but it still does not help if I put it in front of the if statement. It ignores it and allways sends the form to else. Do you have any other sugestions?
  4. I getting an array send to my contact form. and If I echo $sig it shows that ist's there. But the following if statement does not work. Do I need to say anything bevor I start the if statement? I tryed everything. with and without "" with and without echo... Please help. echo "$sig"; if ($sig == "Herr Colin Rhyner") { $myemail= "c@personal.ch"; } elseif ($sig == "Frau Loan Do") { $myemail= "rila@ril.biz"; } elseif ($sig == "Frau Manuela Jau") { $myemail= "mjau@personal.ch"; } else { $myemail= "rila@fre.ch"; }
  5. Oh no, I still have a problem! echo "$sig"; if ($sig == "Herr Colin Rhyner") { $myemail= "crhyner@smartpersonal.ch"; } elseif ($sig == "Frau Loan Do") { $myemail= "rila@rilana.biz"; } elseif ($sig == "Frau Manuela Jau") { $myemail= "mjau@smartpersonal.ch"; } else { $myemail= "rila@freesurf.ch"; } i tryed everything, with "" without "" wich echo without echo... If I put sig = "" on top and then start the if funktion it works, but that's not what I need. What do I need to put bevor the if statement so it will take the sig value? Please help.
  6. wow that was it!!!!!!!!!! verry cool! thanks so much!
  7. Hy guyes I am having a Problem with an output of any array. Could you please help me? I am having an Info Page with the following information that works. <tr> <td colspan="3" valign=top> <span class="inhalt"> smartpersonal gmbh<br><?=$a[sig]?><br>Churerstrasse 20<br>8808 Pfäffikon SZ<br> Tel. 055 417 30 10<br>Fax 055 417 30 19<br><br> </span> <tr> <td height="41" colspan="2" align=center valign="bottom"> <form action=http://www.smartpersonal.ch/contact.php method=post> <input type=hidden name=job_id value=<?=$a[job_id]?>> <input type=hidden name=sig value=<?=$a[sig]?>> <input type=submit name=friend value="Bewerbung über unser Kontaktformular"> </form> </td> <td align=center valign="bottom"><form action=Send.php method=post> <input type=hidden name=job_id value=<?=$a[job_id]?>> <input type=submit name=friend value="an einen Freund senden"> </form></td> </tr> <input type=hidden name=sig value=<?=$a[sig]?>> Is the Person who wrote the Info and the output of this is someting like Rilana Martinato but I am sendeing this Info to a PHP Contact Page which is not connected to the database with the above input hidden..... the Problem now is that when I echo $sig in my contact page it want give me Rilana Martinato it will only output Rilana so basicely it want output the spaces it stops after the first word. What do I need to do now? Is there an easy way? Like another command? When I echo <?=$a[sig]?> nothing works at all, but if I output only $sig, it will only show the first word. Please help me, I would realy aprechiate it! Thanks a lot! Rilana
  8. yes I saw that mistake earlier, but it still want work... I evan found a easier tutorial which also doesnt work.... <?php //connecting $dbname = ""; $dbloc = ""; $dbuser = ""; $dbpass = ""; mysql_connect($dbloc, $dbuser, $dbpass) or die (mysql_error()); mysql_select_db($dbname) or die (mysql_error()); //end connecting $name = strip_tags($http_post_data['name2']); $msg = strip_tags($http_post_data['msg']); $insert_str = "INSERT INTO flashnphp(name, msg) VALUES('" . $name . "', '" . $msg . "')"; $mysql = mysql_query($insert_str); if($mysql){ echo "done"; } else { echo "error :" . mysql_error(); } ?> this one does create rows in the table, but only empty once. I checked all the spelling and it's all correct. Thanks for helping I realy aprechiate it!
  9. I am using this table mostly for learning and I will change the infos later.... Please could someone help me? I am trying to figure this out for night and days going thrue several tutorials and I just dont get it... why doesn't it work?
  10. Hi everyone. I am trying to figure out something supposely easy and I cant get it working. Please help me. I do have a flash form and I am sending data via a php to an e-mail Adress. So far so good. That works. But now I am trying to write the info into a mysql database at the same time. I tryed setting it up with a html form and php to start. But I cant evan get that to work! My hosting Package only support PHP 5. Maby thats the Problme. But I dont have a clue. Please help. I realy would aprechiate to find out what I am doing wrong. This is my html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Unbenanntes Dokument</title> </head> <body> <html> <body> <form action="form.php" method="post"> from: <input type="text" name="from" /> Geschlecht: <input type="text" name="Geschlecht" /> Vorname: <input type="text" name="Vorname" /> Name: <input type="text" name="Name" /> Loesung: <input type="text" name="Loesung" /> Fahrzeug: <input type="text" name="Fahrzeug" /> Teilnahmebedingung: <input type="text" name="Teilnahmebedingung" /> <input type="submit" /> </form> </body> </html> </body> </html> And this my PHP <?php $link = mysql_connect('rilanab.mysql.db.internal', 'rilanab_rilana', 'rilana'); if (!$link) { die('Could not connect: ' . mysql_error()); } mysql_select_db('rilanab_form'); mysql_query("INSERT INTO person (from, Geschlecht, Vorname, Name, Loesung, Fahrzeug, Teilnahmebedingung) VALUES('$from', '$Geschlecht', '$Vorname', $Name', $Loesung', $Fahrzeug', $Teilnahmebedingung')"); ?> The connection to the database seems to be working. And this my database dump -- phpMyAdmin SQL Dump -- version 2.11.4 -- http://www.phpmyadmin.net -- -- Host: mysql02.db.hostpoint.internal -- Erstellungszeit: 29. Februar 2008 um 14:25 -- Server Version: 5.1.22 -- PHP-Version: 5.2.5 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; -- -- Datenbank: `rilanab_form` -- -- -------------------------------------------------------- -- -- Tabellenstruktur für Tabelle `personnel` -- CREATE TABLE IF NOT EXISTS `personnel` ( `id` int(11) NOT NULL AUTO_INCREMENT, `Vorname` varchar(25) COLLATE utf8_unicode_ci DEFAULT NULL, `Name` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, `Geschlecht` varchar(12) COLLATE utf8_unicode_ci DEFAULT NULL, `from` varchar(35) COLLATE utf8_unicode_ci DEFAULT NULL, `Loesung` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, `Fahrzeug` varchar(20) COLLATE utf8_unicode_ci NOT NULL, `Teilnahmebedingung` varchar(20) COLLATE utf8_unicode_ci NOT NULL, UNIQUE KEY `id` (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; -- -- Daten für Tabelle `personnel` -- Please help. Thanks a lot!
  11. Hi guyes beleve it or not I am still trying to do this language switch thing and it is realy giving me such a hard time! I realy would aprechiate it if someone could stick with me and help me thrue it! I tryed to figure it out and tryed so many different ways but it just want work for me! I find it verry confusing!!!! Please help me! I ended up trying to do this! <?php switch($language) { case "english": $address = "/english/"; $header = $_SERVER['SCRIPT_NAME']; $headerAddress = "$header$address"; header("Location: $headerAddress"); break; } ?> and then call it with <a href="?language=english">test</a> but that does not work at all! Does anyone has a good Idea?
  12. hi thanks for your replay when I do what you said I get /home/rilanab/public_html/deutsch/ as echo. But how do I make the link? How do I say show the same documentname from the english folder? I tryed <a href="?language=english">test</a> but that links me to http://www.rilana.biz/geissmann/deutsch/test.php?language=english unstead of http://www.rilana.biz/geissmann/english/test.php
  13. I am trying to do a simple langauge switch and I thaught I had figure it out, but no it sitll doesnt work. <?php function sprache() { switch($_REQUEST['language']) { case 'english': header("Location: " . $_SERVER['DOCUMENT_ROOT'] . "/english/"); exit; break; case 'deutsch': header("Location: " . $_SERVER['DOCUMENT_ROOT'] . "/deutsch/"); exit; break; } } ?> Link to call the script <p><a href="?language=english">test</a></p> What is happening is that it does http://www.rilana.biz/geissmann/deutsch/test.php?language=english unstead of going http://www.rilana.biz/geissmann/english/test.php?language=english Please does anyone know why this is not working?
  14. ok it must be someting with my navigation file, cause when I put the link directely in the page without include then the script works.... I think I will figure it out now! thanks a lot
  15. http://www.phpfreaks.com/forums/index.php/topic,118755.0.html
  16. could it be that me link <a href="?language=english"> </a> is wrong?
  17. yes, but it still goes english/deutsch unstead of just deutsch
  18. thanks something is defenetly happening now. but it doesn't work fully yet. When I klick on de (d) it cant find the page because it is looking in the wrong directory. I used this code.... <?php function sprache() { switch($_REQUEST['language']) { case "english": header("Location: " . $_SERVER['DOCUMENT_ROOT'] . "../english/"); exit; break; case "deutsch": header("Location: " . $_SERVER['DOCUMENT_ROOT'] . "../deutsch/"); exit; break; } } ?> And unsted of going ../english it goes english/deutsch maby the $_SERVER['DOCUMENT_ROOT'] has something to do with that. thats why I tryed ../deutsch but it still doesn't work. Thanks again.
  19. Hello everyone I am making a multilanguage site. Meaning that the english Navigation will have a little (d) for german. And by clicking on it the same page from a different folder should be displayed. So far I cam up with: <?php function sprache() { switch($_REQUEST['language']) { case 'englisch': HEADER("Location:/english/"); break; case 'deutsch': HEADER("Location:/deutsch/"); } } ?> For the header in each document and <a href="?language=deutsch">deutsch</a> for the link that should call the funktion I am shure that this should be a verry easy task, but my knowledge of php and coding are not verry good as you can see. I realy would aprechiate to get some help, some pointers how to get this thing working. Thank you verry much, Rilana
  20. thanks for the tip! take care and thanks again!
  21. I am trying to do a flexible layout with css. http://www.rilana.biz/defacto/english/index.php The Problem is that the buttom Layer is set to bottom: 0px; but when I start resizing the screen, the one layer collapses with the text layer and that looks ugly. It's two layer on top of each other. I need to do something to eighter not let the people resize the window to small or I need to script something that says if the screen gets to small, hide that buttom layer. I have been looking for a tutorial but didnt find anything that could help me.
  22. OK Now I think I see the light! Without DESC works better, what thrue me off was the first 5 or so where totally out of order, but now I found out it's because they are not set to fake or real! Thank you so much I wished I could be thinking like that!!!!! do you know anything about CSS? I got a CSS Problem and I think I can only solve it by using javascript or so.... Hey Thank you verry much for your help!
  23. thanks, it does put it in a different order, but it still isn't correct. erfasst only determins fake or real. Meaning it's only a variable which is set to fake or real in the backend. And if it's set to fake, thenk it takes allways todays date. So I would have to find a way to say all the erfasst that are set to fake should be in the beginning of the list. Is there a way I could do this? I guess I would have an If thing or so...??? Thanks a lot for your help, I apreciate it!
  24. Hi again, thanks that sorting helped a lot! Its almost perfect now! I had to change it to another variable, to ERyear etc. because this was the one I created a while ago to write into the database. But also created something that gives me a problem sorting now. This guy said that some jobs are allways available but he didnt wanted to give the impression that they are old. So I created a box for him where he can make the choice to set the date to the actual creation date or to always today. It look like that: while($as = mysql_fetch_array($rqs)) { //$ex13 = date('d', mktime(0,0,0, $as[EXmonth] - date(m), $as[EXday] - date(d), $as[EXyear] - date(Y))); $day = date(d); $month = date(m); $year = date(Y); $EXdate = "$as[EXyear]"."-"."$as[EXmonth]"."-"."$as[EXday]"; $today = date("d-m-Y"); $ERdate = "$as[ERday]"."-"."$as[ERmonth]"."-"."$as[ERyear]"; if($as[erfasst] == "fake") { $colin = "$today"; } else { $colin = "$ERdate"; } $dnes = "$year"."-"."$month"."-"."$day"; $qd = "select to_days('$EXdate') - to_days('$dnes')"; $rqd = mysql_query($qd) or die(mysql_error()); $ex13 = mysql_fetch_array($rqd); if($col == "cococo") { $col = "F2F2F2"; } else { $col = "cococo"; } echo "<tr bgcolor=\"$col\" style=\"font-size:12\"> <td class=inhalt><a class=TN href=\"JobInfo.php?job_id=$as[job_id]\" class=bmnu> $as[position] </a></td><td class=inhalt> $as[bereich] </td><td align=left class=inhalt> $as[anstellung] </td> <td align=left class=inhalt> $colin </td> </tr>"; } So now I have the Problem that the dates work fine but of course it puts that fake created date that is allways today in order of the creation day.... I tryed to figure it out and tryed to sort it by ERdate but that does not work because I dont have ERdate in the database it's created in the php document. I hope you can figure out my confusing writing :-) thank you verry much for your help!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.