PHP - Phpmyadmin Excel 2007 / 2010
Hi,
Any other way to import the native xlsx excel file into PHPmyadmin. I know this function was supported in the older versions prior to phpMyAdmin 3.4.5. I don't want to convert the excel file to csv format. Thanks Similar TutorialsI wish to know how i can convert this date 24-09-2010 to this format 2010-09-24 I need some help and hopefully will respond. I'm trying to put some information to the second row of the excel sheet once extracted. Can somebody help me with this script? I'm trying to move the address line to the second row. Thanks. imap_fetchstructure is not returing information about attachments for certain e-mails after the mailbox is migrated to exchange 2010. Using IMAP protocol and was working fine until the migration from exchange 2007 to 2010. 99% of emails with attachments works fine, but few don't. I can replicate the issue when an attachment is sent from gmail accounts or some xerox devices to exchange 2010. The output of imap_fetchstructure (message has no body, only attachment) looks like below, as you can see, parts is returning null. I have tested it using imap-2006e and imap-4.7b libraries and produces same issues. Any ideas how to resolve the issue or debug this issue? Can also replicate the problem in Thunderbird 2.0.0.24 stdClass Object ( [type] => 1 [encoding] => 5 [ifsubtype] => 1 [subtype] => MIXED [ifdescription] => 0 [ifid] => 0 [ifdisposition] => 0 [ifdparameters] => 0 [ifparameters] => 1 [parameters] => Array ( => stdClass Object ( [attribute] => boundary [value] => AHNKAKBLDCDIDAGCDHGDAAAKACAK ) ) [parts] => Array ( ) ) Hello, i am currently getting an Microsoft Excel formatted text file whose save type is .Txt from a URL.I used to open it and will change the save type as excel file. Please suggest whether we can do this with php code. currently my code is like this, <? php copy("http://www.faa.gov/airports/airport_safety/airportdata_5010/menu/emergencyplanexport.cfm?Region=&District=&State=&County=&City=LAS%20VEGAS&Use=&Certification=","./contactsexport.xls"); ?> where as the contactsexport.xls type is .Txt which i need it in .xls Thanks in Advance. Hi, Since the latest versions of Access (2007/2010) it's possible to add attachments to rows. I have such a database with members and their photos, but i would like to export them (including photos) and use them for a new webapplication. I have made a XML-export with Access 2007. The photos which i have attached are encoded in the XML export. Please find below an example of the file smiley.jpg, which i have attached in a random row in my database. (The original file smiley.jpg you may find back he http://img812.imageshack.us/img812/8248/smileyq.jpg) XML-export generated by Access 2007 Code: [Select] <Foto> <FileData>FAAAAAEAAAAEAAAAagBwAGcAAAD/2P/gABBKRklGAAEBAQBkAGQAAP/bAEMAAwIC AwICAwMDAwQDAwQFCAUFBAQFCgcHBggMCgwMCwoLCw0OEhANDhEOCwsQFhARExQV FRUMDxcYFhQYEhQVFP/bAEMBAwQEBQQFCQUFCRQNCw0UFBQUFBQUFBQUFBQUFBQU FBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFP/AABEIACgAKAMBIgAC EQEDEQH/xAAbAAACAgMBAAAAAAAAAAAAAAAABgUHAQgJA//EADIQAAIABAMFBgYC AwAAAAAAAAECAwQFEQAGEgcTFSExCBRRYYGRCSIkMkGxM3GCodH/xAAYAQADAQEA AAAAAAAAAAAAAAAEBQgHBv/EACgRAAIBAwMDBAIDAAAAAAAAAAECEQADBAUhMQYS QQciYYETURRxkf/aAAwDAQACEQMRAD8A6nxoyS8Mu5soxAz1VnI9xBPd4fiBdj64 KpP7+omCD8kHl/l+f+Y0T+KR2m9ofZ+puziHkKomi8Um5qPOTywEi69wIOiCdakB W3rEjqdAF7XxmWp6te1TLOlafd7GkiZiSASdxuAIjbmjUthF73FbnzMSoKxZZ+YD eG9NvbBI5yqFMihZ0d8l782AAdR+j6++FSo5xqSbIouaBTTxhaEakKaQf5+77zdW 6/d8vjjUT4aHaJz92gKDtAXPdQasmlzktElJ5oCQiN+IpeCNCgWTdqQOo126WxO7 6h1FgWcnWsDLITHZAwLEz3tA9pkHfmfqmwS0xW2y810ekp2DUZZJiXiCJCcXDDBh GyZUGp1ZMizfTzNyoPQOBe/qBb2wYp/o/qW31VpKZ6jtee1x+mETHwQQR8GKS5Fk 2LhWstMlavPq33CO/tqNsQGYMv5U2nU+Xh1qj0vMsnIzpiwUqEqkwkGZguyFlDgg OrBluPMYlNodBVp12imOslO21NLx3gsHFrjWhDC9gevPmOmKRg54idngvR80S802 zxXZqTmaWgvHh02ETcSs6FBaGqE6UjkFCmkOVZbvKGvPn4Gr5eEs/mVyVA2LKSSC vkkggwN4mJinloK1tW8VeUaNqwq0LLGVtmdOiwKLSKZlqRnJwRIkOnyqS8OLMRWC BmCAAszFVuevIeGIM9oHZeKXxI7RsqcP06u88altFv714Uouc37Q8SHS8tSs1D2d 7xYlUzJNQXgJU0Uhu6ySuAzo5ADx7BdGpULM2pM2/i5+QzNkq1u1PuJBA2/uAW57 V5J480Z3IONzV0St+P0zT92/T2uL/wCsGPfZ3l9EnUeFv2k5LUEaYjvGdnN+RdyW NrnqeXIdMGK49HtOvYehXL9wELdclZ2lQAJ+yD/lIdQcNdAHgVYU9IwKlKvLzCCJ Cccwf2PPCNUMm1Gmuxk/rZf8C4DgeYPI+ntgwY7vqjo/Sep7U56HvUbOphgOYmCC Pggx4ihrGRcsn2mkYbI8vCrcQGz2liqatffODQt7q8d5ovfzvh5p+TajUnUzv0Uv +VuC5HkOg9fbBgxknTvp1o2bktczGuXRb4VmEfcAGPgEUdey7irCwJp6kZGDTpVJ eXQQ4SCwA/Z88GDBikbVpLKLatKFVRAA2AA4AH6pQSSZNf/Z </FileData> <FileName>smiley.jpg</FileName> <FileType>jpg</FileType> </Foto> It seems to be encoded with base64, but as soon as i try to decode it using the function base64_decode(), i don't get a valid output back. I have found some additional data back in the XSD-file, which is automatically generated when you make an XML-export in Access. There it seems to refer to base64, so i don't know what's going wrong. Code: [Select] <xsd:element name="FileData" minOccurs="0" od:jetType="oleobject" od:sqlSType="image"> <xsd:simpleType> <xsd:restriction base="xsd:base64Binary"> <xsd:maxLength value="1476395008"/> </xsd:restriction> </xsd:simpleType> </xsd:element> I have tried the following code, to get the image back ($data is filled with the encoded stuff from the XML-export): Code: [Select] <?php header('Content-Type: image/jpeg'); echo base64_decode($data); ?> I have looked on several websites, but i can't find a solution for this issue. The main goal is to export approx. 2500 members (with photos attached) from Access 2007. The data can be exported easily, but it's all about the photos which make it complicated. i have been working with a website but only locally. i am now trying to put it online which is ok. when i was working with it locally i have been able to create multiple users which have different privileges to each page. for example i said one of my users can only read and the other can read write. the problem is when i have went to create these users online i can't seem to find the create user option in phpmyadmin. i am missing the obvious or will i have to code them in and if so can you direct me to a tutorial which shows me how. thanks in advance I have a form where it ask the user to select the student ID, course ID, enter the grades and comments. The Student ID and CourseID is selected from a drop down menu, but when the data is sent to PHPMYADMIN it enters a 0 into the SID and CID How to I get it save the numbers which has been selected Hi guys I have two questions: Question 1: phpmyadmin If my host does not provide phpmyadmin and I want to install it myself, can I just download phpmyadmin and copy it to my public_html folder or is there another way to install it on my site?? Question 2: Email Script I have a script that sends an email to a system that sends out multiple sms's. The system works like this, I send an email to an address with an attachment called cellnumbers.txt with a list of all the cellnumbers. I must add a specific subject. When I send the email to my own email address, it comes correctly through. But when it is sent to the address of the server, no sms are received. I attached my script. Please take a look. Your help will be greatly appretiated. Thank you Hi How can I make the data in phpmyadmin accept Arabic Language. Now Arabic language shows as question markss ?????????????. Is there anyway to do this via php? Hi. I having trouble with counting rows in phpmyadmin. It works fine this way: Code: [Select] $result_rows = mysql_query("SELECT * FROM events"); But when i modify the code to this it doesnt work at all. Code: [Select] $result_rows = mysql_query("SELECT * FROM events WHERE category = 'adults' ORDER BY 'date'"); Any idea what is wrong? I have a db.php and inside it I filled out all the info needed:
<?php define('DB_HOST', 'example.com'); define('DB_NAME', 'database_name'); define('DB_USERNAME', 'user_name'); define('DB_PASSWORD', '*******'); $odb = new PDO('mysql:host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USERNAME, DB_PASSWORD); ?>My problem is with the DB_HOST, is that my direct URL to the site? for example, google.com or is it like an IP? Hi, I am trying to create a drop down list in php and I want the data to come from a table that I have created in phpmyadmin. The code that I have created allows me to select values from the drop down list and insert the rest of the data. However when I check the the table the SID and Cid are set to 0 and the grade field is empty and the comments field contains the grade. The SID and Cid are both composite keys. <?php $sql = "SELECT Cid FROM course"; $db1 = new DBStudent_Course(); $db1->openDB(); $result = $db1->getResult($sql); echo"<select name = Cid>"; while ($row = mysql_fetch_object($result)) { echo "<option value = '" . $row->Cid . "'>$row->Cid</option>"; } echo"</select>"; echo "</p>"; ?> <?php $sql = "SELECT SID FROM student"; $db1 = new DBStudent_Course(); $db1->openDB(); $result = $db1->getResult($sql); echo"<select name = SID>"; while ($row = mysql_fetch_object($result)) { echo "<option value = '" . $row->SID . "'>$row->SID</option>"; } echo"</select>"; echo "</p>"; ?> <?php if (!$_POST) { //page loads for the first time ?> <form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post"> grade:<input type="text" name="grade"/><br/> comments:<input type="text" name="comments" /><br /> <input type="submit" value="Save" /> </form> <?php } else { $Cid = $_POST["Cid"]; $SID = $_POST["SID"]; $grade = $_POST["grade"]; $comments = $_POST["comments"]; $db1 = new DBStudent_Course(); $db1->openDB(); $numofrows = $db1->insert_student_course("", $SID, $Cid, $grade, $comments); echo "Success. Number of rows affected: <strong>{$numofrows}<strong>"; $db1->closeDB(); } ?> Using phpMyAdmin I loaded 6 test records with the id set to auto_increment and it loaded all the data correctly with id # 1-6. Then from somewhere it got the number 333353 and auto_increments it as the value for the id. So now I have id's 1-6 and 333353, 333354, ect. For every record I add it increments it. I deleted all but records 1-6 and tried again but it has the last value of 3333xx stored somewhere and increments it. Deleted them again, closed the program, came back and it still does it. Hi, I cannot find where to add foreign key constraints in phpmyadmin! Any help is appreciated! Hi guys, I would like to seek help on inserting data whenever the switch is on or off to my sensor mySQL database in phpMyAdmin from my control.php. I'm using Raspberry PI as my hardware and follow a few tutorials to create my own Web Control Interface, it works perfectly without insert method. After I implemented insert method to my control.php and execute it, it cannot works and cannot store. Sorry for the caps, but this is relatively time sensitive. I am trying to make a register form, but when I click the submit button, nothing happens. It doesn't add to the table, it doesn't bring me home, doesn't even display the errors if the PWD's don't match or the fields are blank. Here's my code, thanks guys ! PS: The DB name is phptest, and the table is called users. Code: [Select] <?php error_reporting(0); require_once('connector.php'); $errors = array(); if ($_POST["submit"]) { if (empty($_POST['username'])) { array_push($errors, 'You did not submit a username.');} if (empty($_POST['email'])) { array_push($errors, 'You did not submit a email.');} if (empty($_POST['password1'])) { array_push($errors, 'You did not submit a password.');} $old_usn = mysql_query("SELECT id FROM users WHERE name = '".$_POST['username']."' LIMIT 1") or die (mysql_error()); if (mysql_num_rows($old_usn) > 0) { array_push($errors, 'This username is already registered.');} $old_email = mysql_query("SELECT id FROM users WHERE email = '".$_POST['email']."' LIMIT 1") or die (mysql_error()); if (mysql_num_rows($old_email) > 0) { array_push($errors, 'This email is already registered.');} if ($_POST['password1'] != $_POST['password2']) { array_push($errors,'You entered two different passwords');} if(sizeof($errors) == 0) { $username = $_POST['username']; $email = $_POST['email']; $password = sha1 ($_POST['password1']); mysql_query("INSERT INTO users (name, hashed_psw, email, joined) VALUES ('{$username}', '{$password1}', '{$email}', NOW());") or die (mysql_error()); header ('Location: index.php?msg=1'); } } ?> <html> <head> <title>register</title> </head> <body> <?php foreach($errors as $e) { echo $e; echo "<br/>\n"; } ?> <form action="register.php" method="post"> <h4> Username: <br /> <input name="username" type="text" value="" size="10" maxlength="16" /> <br /> <br /> Email: <br /> <input name="email" type="text" value="" size="10" maxlength="100" /> <br /> <br /> Password: <br /> <input name="password1" type="password" value="" size="10" maxlength="16" /> <br /> <br /> Confirm Password: <br /> <input name="password2" type="password" value="" size="10" maxlength="16" /> <br /> <br /> <input name="submit" type="button" value="Register" /> </h4> </form> </body> </html> And heres the connector.php script: Code: [Select] <?php mysql_connect("localhost", "***", "***") or die (mysql_error()); mysql_select_db("phptest") or die (mysql_error()); ?>(yes, the asterisks have the name and pw, just put them just in caseys! Each time i try to open WAMP's phpmyadmin so i can create a database it has this ERROR #1045 - Access denied for user 'root'@'localhost' (using password: NO) how do i fix it I have used the XAMPP installer to install php and MySQL locall on my computer. I also succeeded in setting the security for XAMPP pages, the MySQL admin user root and phpMyAdmin login. When I enter phpMyAdmin via the link in the XAMPP initial page I do however receive a red notification: phpMyAdmin configuration storage is not fully configured; some extensions are not activated. To find out click here. I have attached a screenshot showing three items which are not OK, shown in red. I looked up in the documentation, but could not find out. I hope someone can help. I don't even know if it is important to fix this problem. Regards, Erik Attached Files XAMPP2.jpg 41.08KB 0 downloads Hi All,
So phpMyAdmin can generate quite nice graphs, and I was wondering if it is possible to have these graphs pull through into a PHP page?
This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=352409.0 |