-
Posts
5,717 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Adam
-
Given the nature in which it's being used, I think you'd be fine with something as simple as this: preg_match_all('#<NameVirtualHost (.*?)>#', $source, $vhost_matches);
-
Heh.. http://failblog.org/2009/06/22/norton-antivirus-fail/
-
From what I've read FreePDF is pretty good. But if you look at the comments at the bottom of the page here, there's a few other recommendations.
-
In my honest opinion... First off I find myself thinking, what is this? ... And still after visiting several pages and clicking around a bit, I have no idea. Certainly nothing that would make me think about registering. Design-wise, I don't like the look of it. Too many black and gray gradients dotted around. The logo sticks out like a saw thumb. The images dotted around, generally all the "find us on facebook" type links, don't blend in well. The Google ads at the top of the page are annoying - place them in a more subtle, less intruding place if you can. In general, there's too much going on to take in at once. Source-wise, sorry but that's pretty poor too. You're using HTML tags that are deprecated such as center and font. You're using random tables to create lists that could very easily be achieved with simple LIs / DIVs and CSS. There's no use of text tags such as the <h#> tags or <p>. It's far from validating. It's not optimized for search engines at all, which really with a site like yours, you're generally only going to get the 1x time viewers that find your content through a search engine. Sorry if I've been a bit harsh, but I do think it needs a lot of work both visually and on the mark-up.
-
At a guess I'd say your query doesn't match the table structure, and when you change it, it does. Post your query and table structure. I'm pretty sure '-1' isn't a valid parameter for error_reporting by the way, and you might want to add display_errors to that.
-
I don't think you can to be honest. You could use mysql_affected_rows to find the total, but I don't think there's anyway of distinguishing between an update and an insert. Are you using a kind of 'upsert'?
-
Post the relevant code.
-
[SOLVED] Problem with dynamic data in registration form
Adam replied to SaturdayNightSpecial's topic in PHP Coding Help
I have the feeling you've not started the session before trying to access session data, though the code I'm not sure if that's in order or what. If it's not already, move "session_start()" to the start of your code and see if that fixes the problem. -
Problem lies with your IF: if (isset($_POST['submit'])) { That's checking to see if you've an input set named "submit", except your submit button is named "Send". You can either change the IF or the name of the input to stop viewing your error message.
-
Cheers!
-
Does anybody have a link to an article about this Word issue? I've not heard anything on it till now..
-
Ow man you're hardcore, you're edgy establishment!
-
I really don't like using CMS's like Jommla or Drupal. I use a couple of the well-known PHP frameworks for larger projects, but have my own little light-weight custom framework for the smaller projects. I use a few different editors as well depending where I am or what I'm doing... including vim, notepad++ and zend studio.
-
You need to be testing for the checked property.
-
You're extracting and looping through the data, using PHP to replace the text, then updating each row seperately. Waste of resources when you can achieve the same result with just one simple update query.
-
That's because they're giving you MySQL functions when you're using Access. To be honest, I've not touched Access in quite a while so I'm a little rusty with the SQL capability. Do some reasearch on Google and see what kind of string replacement functions are available, then perform an update like shown below - if possible with Access. You can use odbc_exec to perform queries.
-
Old portfolio design: Very dark, too dark I think. Makes you want to try and look at the monitor from a different angle to see the design features properly. Also it's broken in IE7. Second one: The second one looks like it'd be alright, but too hard to really tell from that small picture. Third one: Not keen at all, doesn't flow. The font of the logo doesn't fit. The content hangs to the left despite there being nothing on the right and the logo centered. The 3 levels of gradients at the top aren't really effective. I wouldn't post an admin link either to be honest. Although only the first one failed validation the mark-up in both is quite poor, for, what I'm assuming is a web design/development portfolio of some kind? I think you should try and go with a more whiter, sharper design and improve the mark-up.
-
Yeah I've heard really great things about Win 7 too. Even that it makes your hardware last longer? In-fact the company I work for are so impressed with it they're planning to install Win 7 on every desktop when it's released in October / November time. That's a good few thousand desktops! I've yet to try it out myself though.
-
You don't need the slash before the 's' modifier, but I'd go with the non-regex option in this case.
-
As Garethp's pointed out, the problem is you're not checking that the session variable is set before testing against it's value. The fact that you're getting this notice though would suggest you are actually being logged out. Correcting this will solve the next problem as well, which is generally caused by trying to set a header after there has been content written to the page (in your case the notice).
-
You've not exactly given the clearest of explanations to be fair. Try this: <?php require("config/config.php"); require("config/opendb.php"); require ("Twitter.class.php"); //Grab content from MySQL $data = mysql_query("SELECT * FROM users") or die(mysql_error()); // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $data )) { // check whether get variables are existing and read xml file if (file_exists($path.$file)) { $xml = simplexml_load_file($path.$file); $xbltweet2 = $xml->Gamertag; $xbltweet = $xml->PresenceInfo->Info; $xbltweet1 = $xml->PresenceInfo->Info2; if ($xml->PresenceInfo->Online == true){ //data to get $tuser = $row[twitteruser]; $tpassword = $row[twitterpass]; //echo $tuser $tweet = new Twitter("$tuser", "$tpassword"); // Set a new status. This can be called multiple times on the same object. // The update() function returns true if the status update was successful or // false if an error occured. In case of an error, a string describing the error // is stored in the error variable of the object (in our case $tweet->error) $success = $tweet->update("$xbltweet2 : $xbltweet : $xbltweet1"); if ($success) echo "Tweet successful!"; echo $tweet->error; } } } ?>
-
Read up on imagejpeg
-
Err I don't really know of any but, why not just make one? Wouldn't exactly be hard...
-
I agree with TheFilmGod that it really only looks good because of the stock images. Some of the fonts used don't really fit in, they look pixelated. Similar with the navigation a bit.