Jump to content

ldougherty

Members
  • Posts

    319
  • Joined

  • Last visited

    Never

Everything posted by ldougherty

  1. Hard to really see from a screen shot but I'd suggest using nested menus if you are going to start to use a ton of different menu options. Search Google for nested menu and you will find ample resources for information on creating them.
  2. print_r would not have outputted it like that.. can you run the code and show the full output so we can see the array itself?
  3. The reason you see the form regardless is because the page posts to itself and the form displays regardless of anything. If you don't want it to display at the end of this if statement if (isset($_POST['submit'])) { you should add and } else { instead of just closing it with } and then add } after the end of the form. If you can't figure out what I mean then post your entire code.
  4. Hmm, without seeing the entire code its hard to decipher exactly what you are doing here.. try this and let me know the output.. $a = array($rows['gq_options']); print_r($rows['gq_options']); echo "<br><br>"; #foreach ($rows['gq_options'] as $v) { # echo " $v<Br>"; #}
  5. This part doesn't really make a whole lot of sense.. "the names must be added into a single DB Entry..." What exactly is your logic behind this? I've created a gallery application and each file name is stored as its own entry in the database. The only reason you would put them all on the same entry would be to track them as one item and surely there are better ways to do that. I mean think of the problems, if a user uploads 2 pictures it writes 2 entries whereas if they upload 10 it writes 10 entries, you need to have a lot of fields that don't end up being used.
  6. $a = array($rows['gq_options']); that is like saying $a is an array with the first value being an array itself. Instead of doing this try.. foreach ($rows['gq_options'] as $v) { echo " $v<Br>"; }
  7. How did you export the data and import to the new server? Did you create a database dump and import it? Have you checked that the collations are the same for both database servers? Try looking in your dump file itself (assuming you have one) and see if the odd characters exist in the file itself. If they do its either your dump or the editor you are using. If they do not then its the method of importing into the new database such as the collation.
  8. The function you are looking for is exif_read_data http://us2.php.net/exif_read_data
  9. Doing what you want to do is possible but would be very complex and not likely something anyone on here can explain to you how to do with a working example. I suggest if your are not comfortable with the concept that you hire a programmer to do so for you. A quick simple solution would be to modify the existing raport.php file as such The below lines of code reference the table row with each column reported. If you only wanted to output 10 columns then adjust the data below to only show the data you want by removing the referring lines you don't need. echo "<tr>"; echo "<th>".$i."</th>"; echo "<th>" . $row['nume'] . "</th>"; echo "<td>" . $row['date'] . "</td>"; echo "<td>" . $row['loc_nastere'] . "</td>"; echo "<td>" . $row['sex'] . "</td>"; echo "<td>" . $row['domiciliul'] . "</td>"; echo "<td>" . $row['telefon'] . "</td>"; echo "<td>" . $row['nr_pas'] . "</td>"; echo "<td>" . $row['cod_pers'] . "</td>"; echo "<td>" . $row['polita'] . "</td>"; echo "<td>" . $row['inst_abs'] . "</td>"; echo "<td>" . $row['data_abs'] . "</td>"; echo "<td>" . $row['form_stud'] . "</td>"; echo "<td>" . $row['sp_dipl'] . "</td>"; echo "<td>" . $row['cal_dipl'] . "</td>"; echo "<td>" . $row['studii'] . "</td>"; echo "<td>" . $row['functia'] . "</td>"; echo "<td>" . $row['data_angaj'] . "</td>"; echo "<td>" . $row['ordin_angaj'] . "</td>"; echo "<td>" . $row['vechime'] . "</td>"; echo "</tr>";
  10. I found something similar on Experts Exchange.. http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20274682.html "Well, at home I use Outlook Express and Express will store emails in the .EML format which is just plain text. The Outlook .MSG file format however is a binary format which is probably a structured storage format. You might be able to read it if you know about COM+ and structured storage. What you need to look into is the IStorage object combined with the StgOpenStorage API function and other storage related omethods and objects. Using this you might discover that the .MSG format holds a lot of valuable information once you've succesfully read the contents. Actually, that's the difference between the .EML format and the .MSG format. The EML stores the email in it's raw format while the MSG stores it as an object. Which is quite nice but it makes the MSG format unreadable unless you use IStorage to read it's contents. If you want to read a .MSG file, you'll have to learn a lot about COM. It's not too difficult but it's a lot of information and it overwhelmes inexperienced developers." There is actually a lot of helpful information in that thread.
  11. You can have your users upload content on your site and store it with YouTube using their API - - - - - - - - - - - - - - - - - - - - - - - - - - - - http://code.google.com/apis/youtube/overview.html What are the YouTube APIs and Tools? YouTube on any screen, any time. The YouTube APIs and Tools enable you to integrate YouTube's video content and functionality into your website, software application, or device.
  12. Google is your friend http://www.phpwebcommerce.com/ http://www.killerphp.com/tutorials/shopping-cart-tutorial/ Google Search Results -> http://tinyurl.com/lcdcxc
  13. A blank white page generally means a PHP error, add this to the top of your page. ini_set('display_errors', 1); error_reporting(E_ALL); This will allow PHP to display any errors that are occurring.
  14. I just loaded your site in IE7 and FF3 and I do not see any white on your pages, the background works fine in both browsers for me.
  15. Instead of using this function to set the default timezone in your script, you can also use the INI setting date.timezone to set the default timezone. http://kb.siteground.com/article/How_to_change_the_datetimezone_value_in_PHP.html If your PHP scripts do not show the correct time, the reason is that most probably your hosting server is in a different timezone. This can be easily resolved by changing a setting in PHP called date.timezone. Depending on your location you can set a specific date.timezone value in PHP using the following option which should be added to your local php.ini file: date.timezone = "US/Central" The above example assumes you'd like to set the timezone for your PHP scripts to US/Central. The full list of supported time zones is available here and you should simply replace "US/Central" with the desired timezone.
  16. This is very easy to do with Javascript.. http://www.willmaster.com/library/javascript/making-form-fields-required.php With PHP you could only check that the contains data after being submitted and if it doesn't redirect back to the script.
  17. If the backup is from a time that actually contains valid information your host will simply need to replace the existing .MYD and .MYI files for the particular table and restart MySQL. MySQL will then bring all of that information in, technically when viewing via shell or phpmyadmin you are just interpreting the content of that file.
  18. From http://www.php.net/manual/en/function.preg-replace.php#49362 The following should be escaped if you are trying to match that character \ ^ . $ | ( ) [ ] * + ? { } , Special Character Definitions \ Quote the next metacharacter ^ Match the beginning of the line . Match any character (except newline) $ Match the end of the line (or before newline at the end) | Alternation () Grouping [] Character class * Match 0 or more times + Match 1 or more times ? Match 1 or 0 times {n} Match exactly n times {n,} Match at least n times {n,m} Match at least n but not more than m times More Special Character Stuff \t tab (HT, TAB) \n newline (LF, NL) \r return (CR) \f form feed (FF) \a alarm (bell) (BEL) \e escape (think troff) (ESC) \033 octal char (think of a PDP-11) \x1B hex char \c[ control char \l lowercase next char (think vi) \u uppercase next char (think vi) \L lowercase till \E (think vi) \U uppercase till \E (think vi) \E end case modification (think vi) \Q quote (disable) pattern metacharacters till \E Even More Special Characters \w Match a "word" character (alphanumeric plus "_") \W Match a non-word character \s Match a whitespace character \S Match a non-whitespace character \d Match a digit character \D Match a non-digit character \b Match a word boundary \B Match a non-(word boundary) \A Match only at beginning of string \Z Match only at end of string, or before newline at the end \z Match only at end of string \G Match only where previous m//g left off (works only with /g) I do not believe the < > needs to be escaped, \ or \\ should have worked. What error do you get when your escaping?
  19. Reference them via the path rather than the absolute URL <a href='index.php' target='mainframe'> <a href='contact.php' target='mainframe'> etc etc
  20. I agree but assuming there is a reason for your methodology when you view source on the page what does it look like?
  21. Well honestly that depends on the host and the change you are requesting. There really is no reason for the host to now allow a change to SMTP settings for the php.ini assuming the php.ini is your sites php.ini not the server php.ini itself
  22. To retain content on the page you would need to use frames, an iframe would likely be your best bet. The key is when your users click on links the link itself needs to specify a target frame otherwise it will take the entire page. http://www.w3schools.com/TAGS/tag_iframe.asp
  23. I just found this, may be useful for you.. http://us2.php.net/manual/en/function.session-cache-expire.php Hello, Some of my customers asked me for a solution form their session not to expire when filling large forms. Sometimes it takes them more than 2 hours to submit (phone, desk customers...). I know I could have forced an ilayer to be refreshed dynamically and then include PHP code using session_cache_expire() function, but this refreshing a page changes the form focus. So I found this the only solution for them not to loose focus over their form element. You can make a session not to expire by using this code. Its a mixture of PHP and JavaScript and can be used on the same page were your code goes or it can be called using an ilayer/iframe from your page. I know this is not the best practice, but in some cases were user has no control over server globals and security is not important this can help. Here is the code. <? //First of all we prevent browsers from caching the image header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); //This piece of code returns a blank gif if($_GET[img] > 0){ header('Content-Type: image/gif'); header("Content-Disposition: inline; filename=".time().".gif"); echo base64_decode(str_replace("\n",""," R0lGODlhAQABAPcAAAAAAAAAQAAAgAAA/ wAgAAAgQAAggAAg/wBAAABAQABAgABA/ wBgAABgQABggABg/wCAAACAQACAgACA/ wCgAACgQACggACg/wDAAADAQADAgADA/ wD/AAD/QAD/gAD//yAAACAAQCAAgCAA/ yAgACAgQCAggCAg/yBAACBAQCBAgCBA/ yBgACBgQCBggCBg/yCAACCAQCCAgCCA/ yCgACCgQCCggCCg/yDAACDAQCDAgCDA/ yD/ACD/QCD/gCD//0AAAEAAQEAAgEAA/ 0AgAEAgQEAggEAg/0BAAEBAQEBAgEBA/ 0BgAEBgQEBggEBg/0CAAECAQECAgECA/ 0CgAECgQECggECg/0DAAEDAQEDAgEDA/ 0D/AED/QED/gED//2AAAGAAQGAAgGAA/ 2AgAGAgQGAggGAg/2BAAGBAQGBAgGBA/ 2BgAGBgQGBggGBg/2CAAGCAQGCAgGCA/ 2CgAGCgQGCggGCg/2DAAGDAQGDAgGDA/ 2D/AGD/QGD/gGD//4AAAIAAQIAAgIAA/ 4AgAIAgQIAggIAg/4BAAIBAQIBAgIBA/ 4BgAIBgQIBggIBg/4CAAICAQICAgICA/ 4CgAICgQICggICg/4DAAIDAQIDAgIDA/ 4D/AID/QID/gID//6AAAKAAQKAAgKAA/ 6AgAKAgQKAggKAg/6BAAKBAQKBAgKBA/ 6BgAKBgQKBggKBg/6CAAKCAQKCAgKCA/ 6CgAKCgQKCggKCg/6DAAKDAQKDAgKDA/ 6D/AKD/QKD/gKD//8AAAMAAQMAAgMAA/ 8AgAMAgQMAggMAg/8BAAMBAQMBAgMBA/ 8BgAMBgQMBggMBg/8CAAMCAQMCAgMCA/ 8CgAMCgQMCggMCg/8DAAMDAQMDAgMDA/ 8D/AMD/QMD/gMD///8AAP8AQP8AgP8A/ /8gAP8gQP8ggP8g//9AAP9AQP9AgP9A/ /9gAP9gQP9ggP9g//+AAP+AQP+AgP+A/ /+gAP+gQP+ggP+g///AAP/AQP/AgP/A/ ///AP//QP//gP///yH5BAEAAP8ALAAAA AABAAEAAAgEAP8FBAA7")); exit; } ?> <!-- HERE YOU CAN INSERT THE HTML OR PHP CODE --> <img name="keepUpdated" src="<?=$_SELF?>?img=999"> <script language="Javascript"> <!-- var updateEvery = 30;//Seconds function keepUpdated() { timer=setTimeout("updateImage()",1000*updateEvery) } function updateImage() { var randNum = Math.floor(Math.random()*999); document.images.keepUpdated.src ="<?=$_SELF?>?img="+randNum; keepUpdated(); } keepUpdated(); //--> </script> I hope this can be helpful for someone. Bermi Ferrer
  24. What they can restore will depend on how the back up was created. With mySQL generally you have two methods to backup the database. 1) You can create dump files of the database which contain the structure and all content in the database. This is essentially a text file with a bunch of SQL queries to recreate the database; you could manipulate this to restore only the content you want. 2) MySQL can be backed up via the files themselves. The actual database should likely be in /var/lib/mysql and each database has a folder there. Each table for the database has a corresponding .MYI and .MYD file. If you restore these particular files and restart mySQL it will load that data from that file. Hope this helps..
  25. From this error message.. Warning: mail() [function.mail]: Failed to connect to mailserver at "maxima12.abac.com" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in D:\inetpub\virtual\cheaptoilettank\WWWROOT\contact.php on line 4 In your php.ini you are specifying the mailserver SMTP as maxima12.abac.com and port SMTP_PORT as 25. This connection no longer works and needs to be adjusted to a valid SMTP server.
×
×
  • 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.