karlosantana
Members-
Content Count
145 -
Joined
-
Last visited
Everything posted by karlosantana
-
Multiple Includes Including 2 PHP files
karlosantana replied to karlosantana's topic in Websites and Web Designing
Sorted! Changed the page container to minimum height of 100%, set footer value to relative....Sorted it! -
Multiple Includes Including 2 PHP files
karlosantana replied to karlosantana's topic in Websites and Web Designing
Anybody? Still Stuck! -
Hello all, once again I'm stuck. I'm designing a website again where a page (index.php) will use 2 PHP include files they are: Header.php Footer.php Now whats happening is instead of footer.php being at the bottom of index.phpit's appearing top of the screen but at the bottom of header.php if that makes sense. I have quoted part of the CSS sheet below which I think is the problem. These are bothe included in the <head></head> section of index.php Please help me! .footer{ position:absolute; width:100%; height:100px; background-image:url('images/foot.png'); bottom: 0px;}Thanks in advanceKyle
-
I have no idea why the heck I'm struggling with this, I'm usually the one giving the help for this sort of thing! Anyway here goes: It's my date comparison script again, I've added the abbility to select "from" and "to" using THIS script I've made the code below <?php require_once 'class.sql2csv.php'; $params = array( 'host' => 'localhost', 'user' => 'root', 'password' => '', 'database' => 'database_name' ); $query = "SELECT * FROM form_data WHERE (sd >='_$date') and (sd < '_$date2')"; new SQL2CSV($params, $query);?> Now what's happening is: it'll pick up "date2" but not "date" and I have no idea what the heck is going on! I've tried all that I know to try and get it right, I'm still confusled! I'm left in your capable hands, thanks in advance Kyle
-
Well if you look here. You will see I have been working on a script to suck all the information from an sql database to Excel. I've had a problem in that I cant select data just from a certain date. I have copied the code I'm using below. It consits of three files class.sql2csv.php $FILENAME = 'exceptions.csv'; // connect to MySQL database $link = mysql_connect($params['host'], $params['user'], $params['password']) or die(mysql_error()); // start using the required database $db = mysql_select_db($params['database'], $link); // execute query to get the data required $res = mysql_query($query, $link) or die(mysql_error()); $colnames = array(); // get column captions and enclose them in doublequotes (") if $print_captions is not set to false if ($print_captions) { for ($i = 0; $i < mysql_num_fields($res); $i++) { $fld = mysql_fetch_field($res, $i); $colnames[] = '"'.$fld->name.'"'; } // insert column captions at the beginning of .csv file $CSV .= implode(",", $colnames); } // iterate through each row // replace single double-quotes with double double-quotes // and add values to .csv file contents if (mysql_num_rows($res) > 0) { while ($row = mysql_fetch_array($res, MYSQL_NUM)) { for ($i = 0; $i < sizeof($row); $i++) $row[$i] = '"'.str_replace('"', '""', $row[$i]).'"'; $CSV .= "\n".implode(",", $row); } } // send output to browser as attachment (force to download file header('Expires linenums:0'><?php class SQL2CSV { // initialize the class with passed parameters function SQL2CSV($params, $query, $print_captions = true) { // set initial .csv file contents $CSV = ''; $FILENAME = 'exceptions.csv'; // connect to MySQL database $link = mysql_connect($params['host'], $params['user'], $params['password']) or die(mysql_error()); // start using the required database $db = mysql_select_db($params['database'], $link); // execute query to get the data required $res = mysql_query($query, $link) or die(mysql_error()); $colnames = array(); // get column captions and enclose them in doublequotes (") if $print_captions is not set to false if ($print_captions) { for ($i = 0; $i < mysql_num_fields($res); $i++) { $fld = mysql_fetch_field($res, $i); $colnames[] = '"'.$fld->name.'"'; } // insert column captions at the beginning of .csv file $CSV .= implode(",", $colnames); } // iterate through each row // replace single double-quotes with double double-quotes // and add values to .csv file contents if (mysql_num_rows($res) > 0) { while ($row = mysql_fetch_array($res, MYSQL_NUM)) { for ($i = 0; $i < sizeof($row); $i++) $row[$i] = '"'.str_replace('"', '""', $row[$i]).'"'; $CSV .= "\n".implode(",", $row); } } // send output to browser as attachment (force to download file header('Expires: Mon, 1 Jan 1990 00:00:00 GMT'); header('Last-Modified: '.gmdate("D,d M Y H:i:s").' GMT'); header('Pragma: no-cache'); header('Content-type: text/csv'); header('Content-Disposition: attachment; filename='.$FILENAME); // print the final contents of .csv file print $CSV; } }?> Next is the page that does everything dump_data.php <?php require_once 'class.sql2csv.php'; $params = array( 'host' => 'sql113.000space.com', 'user' => 'space_5045542', 'password' => '********', 'database' => 'space_5045542_exceptions' ); $query = 'SELECT * FROM Data'; new SQL2CSV($params, $query);?> Then the button to tell everything to initialize <body> <a href="dump_data.php">Dump table contents</a></body> This will dump all the data from an SQL table onto a CSV which I then open in excel. However as I mentioned I need it to be able to recognize the date stamps from an SQL database, which are there already, but i need to be able to have a few buttons one for yesterday and today, or is there a way to select from one date to the other?. Either way can someone help me edit the above code to my need please? I'm getting a bit frustrated and I cant work out what I'm doing wrong! (I've tried loads of stuff!) Cheers Kyle Notice from rvalkass: Removed your password from the code!
-
Php Screipt To Export Sql To Excel
karlosantana replied to karlosantana's topic in Websites and Web Designing
Yep it's in the database . Without sounding really cheaky is there a tutotial you can point me in the direction of or a code that you know?Thanks in advanceKyle -
Php Screipt To Export Sql To Excel
karlosantana replied to karlosantana's topic in Websites and Web Designing
Mate you are the man! It worked I built it and it's awsum! Is there a way that I could filter it out through timestamp? So It'd only show todays submissions?Your still amazing! Thanks againKyle -
Php Screipt To Export Sql To Excel
karlosantana replied to karlosantana's topic in Websites and Web Designing
The only problem wiuth that is when it's opened will it be opened as a spreadsheet or one long line? Or does excel deal with all that? If it does, we're in business Where could I find a script that'll do that, that I can add as a simple button from an Admin area as explained in my last post? -
Hi guys title says everything really, googled it none of the scripts work, tried doing my own and I suck too! I'm running a local server using wampp. Basically it's a phone book I need an "admin" page where the user can go and export all contacts to excel spreadsheet. I'm sure I'm just being the idiot I usually am and am missing something very simple. Surely there is a simple script to do that???CheersKyle
-
A Sort Of Mini Search Engine Once again Im stuck
karlosantana replied to karlosantana's topic in Websites and Web Designing
Ok guys I have 3 days of this then I have to remove it . Attatched is the "Call Tool". Test it, to demonstrate put 320 or 370 in Franchise ID. Basically I need to make a HTML version of it you can see the spreadsheet reads from a saperate spreadsheet to give the answer.I hope that helps *attachment removed as per request* -
A Sort Of Mini Search Engine Once again Im stuck
karlosantana replied to karlosantana's topic in Websites and Web Designing
Ye I deffo need to get that excel sheet to you :)Ok guys give me tomorrow, and I'll grab itCheers -
Hi guys once again I need to bow to your superiorelyness (Of course it's a word ). Anyway I have a macros in excell that searches a list of franchises (royal mail) in work. Now its an excellent tool but it takes up a lot of room. What that list contains: franchise number - Which is how we find the detailsFranchise Name: Where that franchise is coveredSite ID: An ID that shows which region its in.I only need to search by Franchise number. Is there a script that Could help me with that (I will see if I can get it to you so you can have a mess about, it's just politics and all that!Thanks in advance guys (sorry if your confused)
-
I Wznt To Make A Very Simple Thing Yet So Complicated!
karlosantana replied to karlosantana's topic in Software
Hi mate, internet is done through an ethernet connection its scary fast apparently. Writing this on my phone again so if theres any typos im sorry! Cheers -
Hi guys long time no see, how is everyone? Right you gonna have to bear wih me on this one I'm writing this on my nokia 5800 that i got YESTERDAY! Right my parents have a computer that burns half a rain forest just booting the thing up. They purely use it for BBC iPlayer and 4od. What i want to do is build an operating system based on linux of course. I've got the hardware sorted, im making something called a puppy box , apparently they fly! Google it and you'll see what it is i cant do hyperlinks through this!My question as you can see is very simple i need to build an os that will just browse the net, boot really quickly and stop killin rainforests!Anyone whos done something similar speak now! If you know o any sites that are good references for this it woul be really apreciatedI hope this sounds ok kinda hard to type this much this late too!Thanks in advanceKyle
-
http://forums.xisto.com/no_longer_exists/ That's $10 which isn't expensive for what it is, There's the one below which I haven't done any research into http://www.hotscripts.com/listing/battle-net-clan-script-for-php/ There was also a script which I stumbled on by accident and I can't re stumble on it when I do I'll post it here! Hope this helps Karlos ^^is alive!
-
Hello everyone not been on for AGES! we had net problems and i had to move to qupis and now I've got problems. I'm making a social networking site using this script and I cant get it to install Everytime I go to the install page i get this I might put the question on their support tickets, but you guys are probably more clever if you need the link HERE Thanks in advance Been missing you all
-
The title really explains it all. After setting up connection sharing through LAN and on one computer, I had a thought "well could I use this to share an internet connection from a wide distance?". Well could I? So say now that my brother who lives a mile down the road who has no internet connection, but a phoneline, Could he set up a connection going to my IP? I could use a service like DynamicIP where theres a domain "summoned" towards my dynamic IP (or i could change to a broadband company that gives me a static IP) The software I'm using is called CCProxy It's fantastic! I think I've made it clear, So basically I want to make a "broadband company"? Ya a family one HAHA Any Ideas? Karlos
-
A Adsl Router With A Control Panel And A Log Help me please
karlosantana replied to karlosantana's topic in Computer Networks
Ok brilliant that helps! I wounder though could this be used through a WAN? could another pc connect to a domain and share the Internet connection? just a thought but a good one! -
Hello again! Inhuman I have no idea, this is just a basic tutorial! Interesting though PM me when you find something out! garbage Interesting user name! And as for the comment we all start off as beginners! Saint Micheal I actually put a link in the tutorial if you look! Coolcat50 Well I forgot about you! howz things bud? I have an idea for you PM me! Ulfaweb sorry i missed something there "spares for spaces"? Emerger No problem! Thanks again guys (and girls) Karlos
-
I adore fishing, there is nothing nicer than eating a nice long brown trout that you've caught. I had to stop cause of two reasons My mum (and to be honest shes right) says theres no need and secondly the price of licenses and river permits have gone through the roof! Oh if you need any personalized flies I'm the man to call! I have been fly tying for two years now and have built up a few flies! PM me if you need any! Always happy to help Karlos
-
I Have A Dodgy Back... Need Some Tips Please.
karlosantana replied to ~Upnorf Cr3w~'s topic in Health & Fitness
I have something called ankylosing spondylitis which means part of my back and hip is fused together, automatically you think click it DO NOT CLICK YOUR BACK. It is actually the main cause of ankylosing spondylitis in men.The best and only thing you can do is to hang from something, by your arms or leg it doesn't matte it frees up the vertical column, allowing the body to work in the "damaged" area for some time.For the mean time I recommend co-codomal (it can be bought over the counter but that stuff is for pussies go see your doctor ask him to prescribe it) don't relax, keep active.When i say don't relax i mean don't slumber in a chair. The sleeping thing, I had to buy a special mattress (thanks to the guys at NASS i am eternally great full) but for the mean time your best bet is to lay flat, hard to do if you sleep on your side like i do, but it can be done. All in all, enjoy the laughs that people will have at you cause they are funny! and keep active.Hoping you get better soonKarlos