Maq
Administrators-
Posts
9,363 -
Joined
-
Last visited
-
Days Won
3
Everything posted by Maq
-
Found this litte script online. You may want to use some kind of recursive method to take chunks of the CSV if it's running slow. $filename = "file.csv"; $file = fopen($filename, "r"); $read = fread($file, filesize($filename)); $split = array_unique(explode("\n", $read)); fclose($file); $filename2 = "other.csv"; $file2 = fopen($filename2, "a"); foreach($split as $key=>$value) { if($value != "") { fwrite($file2, $value . "\n"); } } fclose($file2); echo "Update done successfully."; ?>
-
Sorry, I don't know of anything specific as I've never actually searched for a mindless job... Look for a Data Entry or Quality Assurance position.
-
Well it's obviously the environment. Do you have paths that are now pointing in the wrong directory? Do you have DB connections that need to be changed? Do what revraz suggested and turn on error reporting: ini_set ("display_errors", "1"); error_reporting(E_ALL);
-
If none of the tables are a weighted percentage, which it looks like they aren't, then yes, you are correct.
-
$sql="SELECT * FROM event_signups WHERE email = \"".$email."\" AND date = \"".$date."\""; Make life easier and use single quotes around your values (for both queries): $sql="SELECT * FROM event_signups WHERE email = '$email' AND date = '$date'"; You should also echo the sql statements to see what's actually being passed through. Add or die(mysql_error()) for each mysql_query function: $rs=mysql_query($sql,$conn) or die(mysql_error()); You should either get errors or see the wrong query echoed to your browser.
-
i dont get it ? lol You're not the only one... @OP Can I ask why you are storing emails in a separate table? There should be an easier way that's also more efficient.
-
Yeah, now it's just hanging there. Looks like I'm the only one who will ever see it...
-
It's unclear what you want but if I had to guess, try this: if(isset($_POST['submit'])) { echo ""; } srand((float) microtime() * 10000000); $input = array("Neo", "Morpheus", "Trinity", "Cypher", "Tank"); $rand_keys = array_rand($input, 2); ?> </pre> <form method="POST" action="<?php%20echo%20%24_SERVER%5B'PHP_SELF'%5D;%20?>"> <
-
Decent Development IDE/Compiler for Linux
Maq replied to proggR's topic in Other Programming Languages
Maybe for small scale projects. But for anything larger you will need an IDE that has all the features or else you will never get anything done. Don't get me wrong, I use VIM and Gedit all the time for small edits and modifications but when you're building something like a large scale J2EE web application you will need a solid IDE. Maybe this is just my opinion, but in my experience this has always proved to be true. -
Why not check out some free templates? If you have access to Photoshop or GIMP there are plenty of good tutorials online on how to make a nice header.
-
I hate to be the first one to be mean, not that I like being mean after someone else, but I think you should consider redoing the whole site. -The colors are ugly and puky looking. -The header looks plain awful. -The buttons look like they're from 1987, same with the roll-over. -There is not much more to look at cause the only other thing that works is the contact page. Don't mean to be mean, it's supposed to be constructive! :'(
-
I want to add white text to this border. I have a div tag that creates a 10px border along the top of my page: div.top { clear: both; width: 955px; height: 110px; position: relative; border-top: 10px #0054a6 solid; } I tried to add this line but it didn't work and it's also not supported by all browsers. content: "This is my text"; I don't use CSS often, any help is appreciated.
-
So which one looks the same? They all look different...
-
[SOLVED] confirmation OK or CANCEL has the same result in ALL cases ?
Maq replied to programguru's topic in Javascript Help
Looks like you were referring to tizag's tutorial on Confirm. What's the point of calling the function on the href link? Why don't you do a button? -
That doesn't mean you should do the same, especially when people are pointing out obvious bugs and security issues. Why give up? You should try to gain ideas from other clan sites... For example I used to belong to this CS clan, Pantless Gaming. They have a pretty good setup.
-
Do you go there or something? Seems like you're getting very defensive over this logo. I tried looking for choctaw high school but there's like 20 of 'em...
-
1) Can you elaborate on your question, it's very unclear. 2) Use code tags.
-
Welcome! Should go here: http://www.phpfreaks.com/forums/index.php/topic,112560.240.html but we'll get a mod to move it for you so don't worry about it.
-
Use double $$ before the variable to get the actual variable name.
-
You could store data in .txt files and read them when the page loads. So your interface would open a text file and write to it with whatever you want to change. Then when your page loads you read that file, and take certain lines out (need to come up with a system) that are called in with PHP. A database would be much much easier and more versatile and organized. This is the point of PHP and the power of dynamic web pages. Where do you think these changes are going to be stored? You have to read them in from somewhere.
-
You can design your own kind of backend interface to update your pages. You should read up on basic html forms W3 Forms. There should be some good examples for you on phpfreaks and the web.
-
Could you be a little more descriptive? How would you like to do this? Cut off the end of the paragraph after a certain amount of words? You could just explode the paragraph and only keep the first x amount of words... but again, need more detail.
-
[SOLVED] echo to specific location from function
Maq replied to aebstract's topic in PHP Coding Help
You're making this more complicated then it should be. Returns are a basic concept of most languages. In your function have one variable called $return_string. Just concatenate everything to it and return it at the end. Then when you want to display everything just do: echo showCart(); Just like premiso exemplified... -
Why don't you look in the manual? mysql_query() Usually it's the resource id or else false.
-
Sorry didn't mean to say class, even though it should be. What does the query function look like? You're calling: $result = $conn->query($query1); which doesn't make sense. Can you show us more of your code? Preferably all of it if it's not too long (