Jump to content

AndieB

Members
  • Posts

    77
  • Joined

  • Last visited

About AndieB

  • Birthday 03/12/1976

Contact Methods

  • Website URL
    http://bodin.acnrep.com

Profile Information

  • Gender
    Male
  • Location
    Sweden
  • Age
    37

AndieB's Achievements

Member

Member (2/5)

0

Reputation

  1. Hi all! I have a very strange situation. I have a webpage, built using PHP, where a visitor shall register his/her first name, last name, e-mail, phone and that choose a dish from a drop-down list. All this takes place using a form that is posted to a "process.php" script which validates the form and then put the data into SESSIONs. A confirm page shows the entered data to the visitor before it is being stored into a database. Pretty common scenario I would assume. The problem I face, is that empty data are being put into the database. After some communication with some of the visitors, I've managed to narrow it down to be related to Apple iPad and/or iPhone users who try to enter their information. Pretty weird! Anyone else who have experienced this? Maybe someone have a solution? Many thanks in advance! Sincerely, Andreas
  2. Hi all GURU's, I have a problem with UTF-8 characters when I post values/data from my MySQL database into the OPTIONs that I use when using a SELECT in my FORM. The PHP script files are in format UTF-8. The database, the tables and the columns are all set in UTF-8. The charset in the META-tag for the html output is set to UTF-8. All other text that is fetched from the database shows my characters (Swedish å ä ö) the right and correct way, EXCEPT when I echo the data in the OPTIONs in my SELECT box. What can I do? Sincerely, Andreas
  3. Thank you very much! This one was really interesting! I'll investigate it further! --Andreas--
  4. Hi all, I am new to this AJAX concept. Have walked through a couple of "tutorials" and get a bit of an idea of how things work out. But I seem not to understand how to get the following in place. [*]A webpage with an INPUT field of type Text [*]User should start a type a country name and it should lookup from a database (live search) [*]When user notices that the correct country is shown, he/she should just hit enter to "select" it. If user finds the correct country two rows down, he/she should be able to step down with the arrow-keys and hit enter to autofill it in the text field. How do I get the above in place? Thankful for any kind of help or script examples or tutorials. Sincerely, Andreas
  5. Hi, if I fetched some data into a string from a database, how do I remove the NL (new line) in the string?? Could be a case where I also get a POST from a FORM treated by PHP. Thankful for any kind of help! Sincerely, Andreas
  6. Hi all, I'm going to load a CSV file and then take the data and do a MySQL insertion. Of course, that is just to import with MySQL, but I need to do some testing of the data first, in order to see into what table the data should be put. Positive values will go into one table and negative values into another. Now, the CSV file I've got, is in UTF-8 charset. When testing this simple code: <?php $row = 1; $handle = fopen("finance.csv", "r"); while (($data = fgetcsv($handle, 0, ";")) !== FALSE) { $num = count($data); echo "<p> $num fields in line $row: <br /></p>\n"; $row++; for ($c=0; $c < $num; $c++) { echo $data[$c] . "<br />\n"; } } fclose($handle); ?> I get a problem. It does not show the data correctly. I've modified the script to look like this: <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> </head> <body> <?php $row = 1; $handle = fopen("finance.csv", "r"); while (($data = fgetcsv($handle, 0, ";")) !== FALSE) { $num = count($data); echo "<p> $num fields in line $row: <br /></p>\n"; $row++; for ($c=0; $c < $num; $c++) { echo $data[$c] . "<br />\n"; } } fclose($handle); ?> </body> </html> But that did not help at all. What am I doing wrong? How should I make sure that the CHARSET becomes correct? Thank you for any kind of help! --Andreas
  7. Yes, I can imagine that it is indeed a very profitable Service to provide. There is a Service with the name go2webinar.com who has kind of the functionality that I am after. Thought that there would be some sort of OpenSource for this as well. I mean, there are ShoutCAST applications for free where you can connect and stream your audio to listeners... so it must exists some sort of application that can combine audio AND video. But I'll keep on searching. Thank you for your reply!
  8. Hi, I'm looking for an application (webbased) that can reside on a host (Linux/Windows) which will stream my video/audio to all who login to my page. I've searched and found some companies that provides such services, but I am looking for tools/applications that I can run/host myself on my own hardware. Anyone got any suggestions? Thank you in advance! Sincerely, Andreas
  9. I used a Windows installer. But I managed to solve it. I downloaded the ZIP file and in that, I found ALL the .dll files. Thank you for your willingness to help! --Andreas
  10. AndieB

    Help with MATH

    Excuse my lack of knowledge, but what is weighted percentage? Sincerely, Andreas
  11. Hi all, I just installed Apache 2.2, PHP5 and MySQL on my laptop. It worked fine and was quite easy. Then I downloaded the phpMyAdmin application. This application complains and alerts me the mcrypt and mbstring needs to be in place in order to function properly. I checked the PHP.ini file and found nothing about mcrypt. Did some search and found an article that I have to add extension=php_mcrypt.dll. But I then noticed that a mbcrypt.dll file is missing and I can not find it anywhere. Any kind soul who can help me out? Sincerely, Andreas
  12. AndieB

    Help with MATH

    Hi all, I need some help learning doing math calculation, hopefully you guys here can help me out. How do you make a TOTAL percentage correctly calculated if the TOTAL percentage is based on lets say 5 other average percentage. Example: I have five (5) tables, lets call the T1 through T5. In each table, I have five (5) rows, lets call these R1 through R5. Each row, states only TRUE or FALSE. So, it could look like this: T1: R1=FALSE, R2=TRUE, R3=TRUE, R4=FALSE, R5=TRUE So in order to calculate the percentage of HOW many are in status TRUE, the calculation would be made like this: 3 ROWS have value TRUE. So, 3 divided by 5 (number of total ROWS) will equal 0,6, which is 60%. Now, for the rest of the tables it could look like this: T1 = 60% T2 = 60% T3 = 80% T4 = 20% T5 = 0% If I now want to give an overall percentage for all the tables percentage values, HOW do I do the math for that? Is it as simple as (60+60+80+20+0)/5 ?? Anyone got some feedback about this? Thanks in advance, Andreas
  13. Hi all, I've got a Javascript code (in an external file) that has the function to validate values in a FORM. Now, I've created my webpage to support more than one language, this by creating a lang.php file where variables are set. As an example eng.lang.php looks like this: $langpack["title"] = "Welcome!"; and for another language, Swedish, the "almost" same file looks like this: $langpack["title"] = "Välkommen!"; Based on the visitors selection of language, the relative language file is included. My question now is: Is it possible to put PHP variables in a Javascript, so that it is processed when the page is loaded and the PHP variables are replaced with values that Javascript can interpret? In my current Javascript code for validating the FORM, is something is not according to my rules, an ALERT box appears, but the text is in English. I would like to be able to use my *.lang.php files variables together with Javascript, so the ALERT boxes displays the message in the language that the visitor has choosen. Am I clear with what I want to achieve? Thank you in advance! Sincerely, Andreas
  14. My Query looks something like: $sqlQuery = "SELECT e_ticketbuyer.*, events.title, events.date, events.city, events.country FROM e_ticketbuyer, events WHERE events.e_id = e_ticketbuyer.e_id Or is there a better way to write it? But, also the main question: When doing a mysql_fetch_assoc for a SQL query, HOW do I differ the fields based on above query? Sincerely, Andreas
  15. No, what I meant I solved, was to extract the table layout. --Andreas
×
×
  • 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.