Jump to content

thaidomizil

Members
  • Posts

    63
  • Joined

  • Last visited

    Never

Everything posted by thaidomizil

  1. Hello, i'm trying to create some file upload which renames the files automatically, the renamed file name needs to be the value from another text field, example: i have a file upload form, and a last name text input, after the file upload the file should be renamed to the value of the last name input. i really don't know where to start here, can anyone give me some hint / advice? Thanks.
  2. Hello fugix, that form tag was a leftover from one of my former trys. I took your advice and just put the opening form tag infront of <table> and the closing form tag behind the last </table>, i don't know why i didn't try this before, but it works. Thank you.
  3. Hello, i've created some table with text fields etc, now i'm having a hard time to figure out where i should place the form tag, i just need the whole thing as a form, but wherever i place it, it messes up everything, can someone help me out here please. this is my code: <table cellspacing="0" cellpadding="0"> <tr> <td><table cellpadding="6" cellspacing="0"> <tbody> <tr> <td colspan="1" valign="top"><table cellpadding="6" cellspacing="0"> <tbody> <tr> <td colspan="1" align="left" bgcolor="#f1f1f1"><fieldset> </form> <legend>Persönliche Angaben</legend> <table border="0" cellpadding="2" cellspacing="0"> <tbody> <tr> <td valign="top" width="100"> Titel<br /></td> <td><input name="Custom_5891" id="Custom_5891" maxlength="100" size="20" type="text" /></td> </tr> <tr> <td valign="top" width="100">Anrede* </td> <td><label for="Anrede"> <select name="Anrede" id="Anrede"> <option value="Frau">Frau</option> <option value="Herr">Herr</option> </select> </label></td> </tr> <tr> <td valign="top" width="100">Vorname* </td> <td><input name="Voornaam" id="Voornaam" maxlength="100" size="30" type="text" /></td> </tr> <tr> <td valign="top" width="100">Nachname* </td> <td><input name="Achternaam" id="Achternaam" maxlength="100" size="30" type="text" /></td> </tr> <tr> <td valign="top" width="100">Adresse* </td> <td><input name="HomeAdres" id="HomeAdres" maxlength="100" size="30" type="text" /></td> </tr> <tr> <td valign="top" width="100">Postleitzahl* </td> <td><input name="HomeAdresPostcode" id="HomeAdresPostcode" maxlength="100" size="15" type="text" /></td> </tr> <tr> <td valign="top" width="100">Wohnort* </td> <td><input name="HomeAdresWoonplaats" id="HomeAdresWoonplaats" maxlength="100" size="30" type="text" /></td> </tr> <tr> <td valign="top" width="100"> Kanton/Bundesland<br /></td> <td><input name="Custom_3601" id="Custom_3601" maxlength="100" size="20" type="text" /></td> </tr> <tr> <td valign="top" width="100">Telefon (privat)* </td> <td><input name="TelefoonThuis" id="TelefoonThuis" maxlength="100" size="30" type="text" /></td> </tr> <tr> <td valign="top" width="100">Telefon (mobil)* </td> <td><input name="TelefoonMobiel" id="TelefoonMobiel" maxlength="100" size="30" type="text" /></td> </tr> <tr> <td valign="top" width="100"> E-Mail* </td> <td><input name="Email" id="Email" maxlength="100" size="30" type="text" /></td> </tr> </tbody> </table> </fieldset></td> </tr> <tr> <td colspan="1" align="left" bgcolor="#f1f1f1"><fieldset> <legend>Interneterfahrung-Kenntnisse </legend> <table border="0" cellpadding="2" cellspacing="0"> <tbody> <tr> <td valign="top" width="100"></td> <td width="117" valign="top"> Interneterfahrung </td> <td valign="top" width="391"><input name="Match_2701_Value_25444" value="1" type="checkbox" /> Keine <input name="Match_2701_Value_25444" value="2" type="checkbox" /> Wenig <input name="Match_2701_Value_25444" value="3" type="checkbox" /> Mittel <input name="Match_2701_Value_25444" value="4" type="checkbox" /> Gut <input name="Match_2701_Value_25444" value="5" type="checkbox" /> Sehr gut</td> </tr> </tbody> </table> </fieldset></td> </tr> <tr> <td colspan="1" align="left" bgcolor="#f1f1f1"><fieldset> <legend>Ausbildung (Bitte Zutreffendes ankreuzen)</legend> <table border="0" cellpadding="2" cellspacing="0"> <tbody> <tr> <td valign="top" width="100"></td> <td valign="top" width="400"><input name="Match_1877" value="19826" type="checkbox" /> Abitur / Matur </td> <td valign="top" width="400"><input name="Match_1877" value="18912" type="checkbox" /> Lehrabschluss / Berufsschule </td> <td valign="top" width="400"><input name="Match_1877" value="18913" type="checkbox" /> Hochschulabschluss </td> </tr> <tr> <td></td> <td valign="top" width="400"><input name="Match_1877" value="18914" type="checkbox" /> Mittlere Reife</td> <td valign="top" width="400"><input name="Match_1877" value="18931" type="checkbox" /> Kein Abschluss</td> <td valign="top" width="400"><input name="Match_1877" value="18915" type="checkbox" /> Andere</td> </tr> <tr> <td></td> </tr> </tbody> </table> </fieldset></td> </tr> <tr> <td colspan="1" align="left" bgcolor="#f1f1f1"><fieldset> <legend>Fähigkeiten (Bitte Zutreffendes ankreuzen)</legend> <table border="0" cellpadding="2" cellspacing="0"> <tbody> <tr> <td valign="top" width="100"></td> <td valign="top" width="400"><input name="Match_1876" value="18889" type="checkbox" /> Administration&Support </td> <td valign="top" width="400"><input name="Match_1876" value="18890" type="checkbox" /> Agronomie </td> <td valign="top" width="400"><input name="Match_1876" value="18903" type="checkbox" /> Andere </td> </tr> <tr> <td></td> <td valign="top" width="400"><input name="Match_1876" value="18891" type="checkbox" /> Biologie </td> <td valign="top" width="400"><input name="Match_1876" value="18892" type="checkbox" /> Chemie </td> <td valign="top" width="400"><input name="Match_1876" value="18904" type="checkbox" /> Einkauf </td> </tr> <tr> <td></td> <td valign="top" width="400"><input name="Match_1876" value="18895" type="checkbox" /> Finanz / Wirtschaftsprüfung </td> <td valign="top" width="400"><input name="Match_1876" value="19500" type="checkbox" /> Forschung und Entwicklung </td> <td valign="top" width="400"><input name="Match_1876" value="18896" type="checkbox" /> General Management </td> </tr> <tr> <td></td> <td valign="top" width="400"><input name="Match_1876" value="18897" type="checkbox" /> Gesundheit & Sicherheit & Umwelt </td> <td valign="top" width="400"><input name="Match_1876" value="18898" type="checkbox" /> HR / Personalentwicklung </td> <td valign="top" width="400"><input name="Match_1876" value="18899" type="checkbox" /> Informatik </td> </tr> <tr> <td></td> <td valign="top" width="400"><input name="Match_1876" value="18901" type="checkbox" /> Ingenieurwesen / Produktion </td> <td valign="top" width="400"><input name="Match_1876" value="18893" type="checkbox" /> Kommunikation </td> <td valign="top" width="400"><input name="Match_1876" value="18894" type="checkbox" /> Kundendienst </td> </tr> <tr> <td></td> <td valign="top" width="400"><input name="Match_1876" value="18902" type="checkbox" /> Marketing </td> <td valign="top" width="400"><input name="Match_1876" value="18905" type="checkbox" /> Projektmanagement </td> <td valign="top" width="400"><input name="Match_1876" value="18906" type="checkbox" /> Qualitätsmanagement </td> </tr> <tr> <td></td> <td valign="top" width="400"><input name="Match_1876" value="18900" type="checkbox" /> Recht&Steuern / Intellectual Property </td> <td valign="top" width="400"><input name="Match_1876" value="18907" type="checkbox" /> Registrierung </td> <td valign="top" width="400"><input name="Match_1876" value="18910" type="checkbox" /> Strategie und Planung </td> </tr> <tr> <td></td> <td valign="top" width="400"><input name="Match_1876" value="18909" type="checkbox" /> Supply Chain Management / Logistik </td> <td valign="top" width="400"><input name="Match_1876" value="27911" type="checkbox" /> Sustainable Excellence </td> <td valign="top" width="400"><input name="Match_1876" value="18908" type="checkbox" /> Verkauf </td> </tr> <tr> <td></td> </tr> </tbody> </table> </fieldset></td> </tr> <tr> <td colspan="1" align="left" bgcolor="#f1f1f1"><fieldset> <legend>Sprachen (Bitte Zutreffendes ankreuzen - Grundkenntnisse / Fortgeschritten / Fliessend)</legend> <table border="0" cellpadding="2" cellspacing="0"> <tbody> <tr> <td valign="top" width="42"></td> <td width="71" valign="top"> Deutsch </td> <td valign="top" width="185"><input name="Match_1884_Value_18956" value="1" type="checkbox" /> <input name="Match_1884_Value_18956" value="3" type="checkbox" /> <input name="Match_1884_Value_18956" value="5" type="checkbox" /></td> <td width="78" valign="top"> Englisch </td> <td valign="top" width="196"><input name="Match_1884_Value_18955" value="1" type="checkbox" /> <input name="Match_1884_Value_18955" value="3" type="checkbox" /> <input name="Match_1884_Value_18955" value="5" type="checkbox" /></td> <td width="68" valign="top"> Französich </td> <td valign="top" width="194"><input name="Match_1884_Value_18957" value="1" type="checkbox" /> <input name="Match_1884_Value_18957" value="3" type="checkbox" /> <input name="Match_1884_Value_18957" value="5" type="checkbox" /></td> </tr> <tr> <td></td> <td valign="top"> Holländisch </td> <td valign="top" width="185"><input name="Match_1884_Value_18960" value="1" type="checkbox" /> <input name="Match_1884_Value_18960" value="3" type="checkbox" /> <input name="Match_1884_Value_18960" value="5" type="checkbox" /></td> <td valign="top"> Indonesisch </td> <td valign="top" width="196"><input name="Match_1884_Value_22976" value="1" type="checkbox" /> <input name="Match_1884_Value_22976" value="3" type="checkbox" /> <input name="Match_1884_Value_22976" value="5" type="checkbox" /></td> <td valign="top"> Italienisch </td> <td valign="top" width="194"><input name="Match_1884_Value_18961" value="1" type="checkbox" /> <input name="Match_1884_Value_18961" value="3" type="checkbox" /> <input name="Match_1884_Value_18961" value="5" type="checkbox" /></td> </tr> <tr> <td></td> <td valign="top"> Japanisch </td> <td valign="top" width="185"><input name="Match_1884_Value_18964" value="1" type="checkbox" /> <input name="Match_1884_Value_18964" value="3" type="checkbox" /> <input name="Match_1884_Value_18964" value="5" type="checkbox" /></td> <td valign="top"> Koreanisch </td> <td valign="top" width="196"><input name="Match_1884_Value_18965" value="1" type="checkbox" /> <input name="Match_1884_Value_18965" value="3" type="checkbox" /> <input name="Match_1884_Value_18965" value="5" type="checkbox" /></td> <td valign="top"> Mandarin </td> <td valign="top" width="194"><input name="Match_1884_Value_18963" value="1" type="checkbox" /> <input name="Match_1884_Value_18963" value="3" type="checkbox" /> <input name="Match_1884_Value_18963" value="5" type="checkbox" /></td> </tr> <tr> <td></td> <td valign="top"> Polnisch </td> <td valign="top" width="185"><input name="Match_1884_Value_22988" value="1" type="checkbox" /> <input name="Match_1884_Value_22988" value="3" type="checkbox" /> <input name="Match_1884_Value_22988" value="5" type="checkbox" /></td> <td valign="top"> Portugiesisch </td> <td valign="top" width="196"><input name="Match_1884_Value_18958" value="1" type="checkbox" /> <input name="Match_1884_Value_18958" value="3" type="checkbox" /> <input name="Match_1884_Value_18958" value="5" type="checkbox" /></td> <td valign="top"> Rumänisch </td> <td valign="top" width="194"><input name="Match_1884_Value_22991" value="1" type="checkbox" /> <input name="Match_1884_Value_22991" value="3" type="checkbox" /> <input name="Match_1884_Value_22991" value="5" type="checkbox" /></td> </tr> <tr> <td></td> <td valign="top"> Russisch </td> <td valign="top" width="185"><input name="Match_1884_Value_18962" value="1" type="checkbox" /> <input name="Match_1884_Value_18962" value="3" type="checkbox" /> <input name="Match_1884_Value_18962" value="5" type="checkbox" /></td> <td valign="top"> Spanisch </td> <td valign="top" width="196"><input name="Match_1884_Value_18959" value="1" type="checkbox" /> <input name="Match_1884_Value_18959" value="3" type="checkbox" /> <input name="Match_1884_Value_18959" value="5" type="checkbox" /></td> <td valign="top"> Tagalog </td> <td valign="top" width="194"><input name="Match_1884_Value_22992" value="1" type="checkbox" /> <input name="Match_1884_Value_22992" value="3" type="checkbox" /> <input name="Match_1884_Value_22992" value="5" type="checkbox" /></td> </tr> <tr> <td></td> <td valign="top"> Thai </td> <td valign="top" width="185"><input name="Match_1884_Value_22975" value="1" type="checkbox" /> <input name="Match_1884_Value_22975" value="3" type="checkbox" /> <input name="Match_1884_Value_22975" value="5" type="checkbox" /></td> <td valign="top"> Tschechisch </td> <td valign="top" width="196"><input name="Match_1884_Value_22987" value="1" type="checkbox" /> <input name="Match_1884_Value_22987" value="3" type="checkbox" /> <input name="Match_1884_Value_22987" value="5" type="checkbox" /></td> <td valign="top"> Ukrainisch </td> <td valign="top" width="194"><input name="Match_1884_Value_22990" value="1" type="checkbox" /> <input name="Match_1884_Value_22990" value="3" type="checkbox" /> <input name="Match_1884_Value_22990" value="5" type="checkbox" /></td> </tr> <tr> <td></td> <td valign="top"> Ungarisch </td> <td valign="top" width="185"><input name="Match_1884_Value_22989" value="1" type="checkbox" /> <input name="Match_1884_Value_22989" value="3" type="checkbox" /> <input name="Match_1884_Value_22989" value="5" type="checkbox" /></td> <td valign="top"> Vietnamesisch </td> <td valign="top" width="196"><input name="Match_1884_Value_22974" value="1" type="checkbox" /> <input name="Match_1884_Value_22974" value="3" type="checkbox" /> <input name="Match_1884_Value_22974" value="5" type="checkbox" /></td> </tr> </tbody> </table> </fieldset></td> </tr> <tr> <td colspan="1" align="left" bgcolor="#f1f1f1"><fieldset> <legend>Andere Sprachen</legend> <table border="0" cellpadding="2" cellspacing="0"> <tbody> <tr> <td valign="top" width="100"> Bitte geben Sie die Sprache und das Sprach-Level an<br /></td> <td><input name="Custom_3720" id="Custom_3720" maxlength="100" size="30" type="text" /></td> </tr> </tbody> </table> </fieldset></td> </tr> <tr> <td colspan="1" align="left" bgcolor="#f1f1f1"><fieldset> <legend>Dokumente anhängen</legend> <p>Maximale Dateigrösse: 2MB</p> <p>Erlaubte Dateiendungen: JPG,BMP,GIF,PNG,TXT,DOC,RTF,PDF</p> <table cellspacing="0" cellpadding="0"> <tr> <td valign="top" width="123">Lebenslauf* </td> <td width="252"><input name="lebenslauf" id="lebenslauf" maxlength="255" size="30" type="file"></td> </tr> <tr> <td valign="top" width="123"> Anschreiben* (Bitte begründen Sie Ihre Bewerbung kurz)<br></td> <td><input name="anschreiben" id="anschreiben" maxlength="255" size="30" type="file"></td> </tr> </table> <p> </p> <table border="0" cellpadding="2" cellspacing="0"> <tbody> <tr> <td valign="top" width="123">Personalausweiskopie (Scan oder Foto)* </td> <td width="247"><input name="persokopie" id="persokopie" maxlength="255" size="30" type="file" /></td> </tr> </tbody> </table> </fieldset></td> </tr> <tr> <td colspan="1" align="left" bgcolor="#f1f1f1"><fieldset> <legend>freiwillig (oder falls erforderlich im Stellenangebot)</legend> <table width="384" border="0" cellpadding="2" cellspacing="0"> <tbody> <tr> <td valign="top" width="126"> Andere Dokumente<br /></td> <td width="250"><input name="andere" id="andere" maxlength="255" size="30" type="file" /></td> </tr> </tbody> </table> </fieldset></td> </tr> <tr> <td colspan="1" align="left" bgcolor="#f1f1f1"><fieldset> <legend>Herkunft der Bewerbung</legend> <table border="0" cellpadding="2" cellspacing="0"> <tbody> <tr> <td valign="top" width="121"> Wie sind Sie auf die Stelle aufmerksam geworden?*<br /></td> <td width="256"><label for="textarea"></label> <textarea name="textarea" id="textarea" cols="45" rows="5"></textarea></td> </tr> </tbody> </table> </fieldset></td> </tr> <tr> <td colspan="1" align="left" bgcolor="#f1f1f1"><fieldset> <legend>Gebrauch von persönlichen Daten* </legend> <table width="904" border="0" cellpadding="2" cellspacing="0"> <tbody> <tr> <td valign="top" width="786"><input name="Match_1881" value="18929" type="checkbox" /> Ich stimme den Bedingungen (untenstehend) zur Behandlung meiner persönlichen Daten zu. </td> <td valign="top" width="110"><input type="submit" name="Absenden" id="Absenden" value="Bewerbung absenden" align="right"></td> </tr> </tbody> </table> </fieldset></td> </tr> <tr> <td colspan="2" align="center"></td> </tr> </tbody> </table></td> </tr> </tbody> </table></td> </tr> </table> Thanks
  4. Thanks to both of you, it's working now.
  5. Hi, i'm trying to get a link shown in some echo, but it just won't work, i tried like this: <?php echo 'The link goes<a href="bezahlung.php?id=$id">here</a>.'; } ?> on the site the link shows as that but the $id should change to the $id value. What am i doing wrong ?
  6. Hello, i'm trying to find a way to show a number of text input fields based on a database value, in my mysql table i have a row value called passengers, this is populated with a number that is chosen by a customer, e.g he fills out a booking form for a flight and wants to book the flight for 3 passengers. Now there is a public page generated for each booking that is accessible via customerpage.php?id=x which pulls the data from the mysql db, now on that page i need 2 text input fields generated for each passenger, full name and date of birth, so if the value is 3 (3 passengers) i will need a total of 6 text input fields and so on. What would be the best possible way to achieve this ? Thanks.
  7. Ok i just solved it myself .. If someone needs something similar, this will do. <?php $result_id = $_REQUEST['id']; if($_POST['Check']) { $lname1 = $_POST['lname1']; $result = mysql_query("select * from booking where id='$result_id' and lname1='$lname1'"); $row = mysql_fetch_assoc($result); if(mysql_num_rows($result)!='0') { header("Location: customerpage.php?id=$result_id"); } else { echo "<script>alert('Invalid Last Name');</script>"; } } ?>
  8. Hi there, i'm trying to find out how i could password protect a page based on a value that has been written into my mysql db before, basically i'm having a booking system, after updating a customers booking he does get a link by e-mail with the page that shows his booking details and his id like customerpage.php?id=1, now if he opens that page, i want to prompt for the value lname1 of row id 1which would be the customers last name, before he can access the page ! Thanks
  9. Ok now i got this: <?php $con = mysql_connect("localhost","test_test","test"); if (!$con) { die('Could not connect: ' . mysql_error()); } //select your database mysql_select_db("test", $con); //dummy post post data $post_id = range(1,20); $title = "Link to a post"; $description = "This is a demonstration of linking to a post all using the same file. Depending if you use by id or a specific value would not matter, you just have to set it to those."; $comment = "blah blah blah is my comment"; //end of dummy post data $id = mysql_real_escape_string($_GET['id']); $home_url = "http://".filter_var($_SERVER['HTTP_HOST'], FILTER_SANITIZE_STRING); $about_page = "http://get.blogdns.com/dynaindex/info/"; $url = "http://".filter_var($_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'], FILTER_SANITIZE_STRING); if (!empty($_SERVER["QUERY_STRING"])){ $url .= "?".filter_var($_SERVER['QUERY_STRING'], FILTER_SANITIZE_STRING); } if ($url == "$home_url") { $url = "$url?$id"; } echo "<a href='$home_url'>Home</a><br />"; echo "<a href='$url'>$url</a><br />"; echo "<a href='$about_page'>Info</a><br />"; echo "<br />"; ?> <form name="input" action="<?php echo $url; ?>" method="get"> ID Number or Post Name:<input size="30"type="text" name="post" style="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #000000;" size="15" value="<?php echo $id; ?>"> <input type="submit" style="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #000000;" size="15" value="Go to Post" /> </form> <?php if (isset($_GET['id'])){ echo "<h2>Post Content</h2"; echo "<hr>"; $post_link = "<a href='$url$post_number'>Permalink</a><br />"; echo $post_link; echo "$id<br />"; echo "<p>".$title."<br />".$description."<br />".$comment."</p><br />"; echo "<hr>"; } elseif ($url == "$about_page"){ echo "<h2>About Page</h2"; echo "My way of displaying different content using a single php script"; } else { echo "<h2>Main Content</h2<br />"; echo "<hr>"; foreach ($post_id as $post_number) { echo $post_number; $post_link = "<a href='$url?id=$post_number'>View post</a>"; echo "<p>$post_link</p><br />"; echo "<hr>"; } echo "<br />"; highlight_file('backend.php'); echo "<br />"; } echo "<br />"; ?> Now i can't seem to find out how i change the "dummy data" to actual data from my tables, i want exactly what that script does, but on the main page where it shows an overview of the posts, i want it to show the overview and include: id, fname1, lname1 and the page that gets opened on link click (e.g id?=1) should then contain this rows from my table: : id, fname1,lname1,kontaktper,tele1,erreichbarkeittele,email1,hinflug,ruckflug,personen,flughafen,flugklasse
  10. You were right, i forgot to edit the table, it's working now, now i'm wondering how would i create a list like page, where it shows lets say 2 tables values like ID and Name, and automatically creates a link to a new page which shows the rest of the table contents ? I'm using the script like this, to show ID, fname1 and lname1 as a preview. <?php //At the top would use a $_GET parameter $id = $_GET['id']; //make mysql connection, use your connection info $con = mysql_connect("localhost","test","test"); if (!$con) { die('Could not connect: ' . mysql_error()); } //select your database mysql_select_db("test", $con); //query what you want, insert your table name $result = mysql_query("SELECT * FROM bookings WHERE id='$id'"); //post loop while($row = mysql_fetch_array($result)) { //use your values echo $row['id'] ."<br />"; echo $row['fname1'] ."<br />"; echo $row['lname1'] ."<br />"; } //close the connection mysql_close($con); ?> All rows from the table, that i need on the "full view" page are: ID, fname1,lname1,kontaktper,tele1,erreichbarkeittele,email1,hinflug,ruckflug,personen,flughafen,flugklasse Thank you for your help.
  11. Thanks for your reply, i checked that link, and tried out the code in that thread, unfortunately i'm receiving this error: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /public_html/test.php on line 18
  12. Hi, i'm just starting with PHP & MySQL so my knowledge is very limited, i just created my first form that saves data to MySQL, now i've created another page that fetches the database and shows the results. Now i want to have pages created for every entry in the database, like entry 1 is ID1 with data: name adress email or whatever, so in the end entry 1 will have a static page accessible through domain.com?id=1 or something like this. The next step would be to have some kind of admin page to edit the data, that is shown. If someone could help me out, or could give me some advice what i need to look for that would be great.
×
×
  • 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.