Jump to content

Destramic

Members
  • Posts

    969
  • Joined

  • Last visited

Everything posted by Destramic

  1. could anyknow tell me why this wouldnt work please? [code] function toggle_checkboxes(form) { var elements = form.elements; for (var i = 0; i < elements.length; i++) { var element = elements[i]; var type    = element.type; if (type.toLowerCase() == "checkbox") { element.checked = checked_value; } } if (checked_value) { checked_value = false; } else { checked_value = true; } } [code][/code][/code]
  2. i have my apache server up and running fine...all im wondering is is it possible just to have a single port open so that people can connect through and see my website when i send link over...? if so how can i do this please? thanks destramic
  3. i have a function which will stripslashes in a string but doesnt seem to be working when i stripslashes on my forms values....can anyone help? (dont think it works at all) [code] function strip_slashes($value) { // Check if Magic Quotes is enabled if (get_magic_quotes_gpc()) { // Check if string exists if (is_string($value)) { return stripslashes($value); } elseif (is_array($value)) { return array_map('strip_slashes', $value); } } else { return $value; } } [/code] destramic
  4. rofl...thats not my site i just typed that in as a example....but that doesnt work on my site...dont know why it did before..
  5. im having problem getting my .haccess file to function...for some reaon if i type 'http://www.domain.co.uk/spammmmmmm'  it wont see to load error.php?error=404 as i would like it to...same as DirectoryIndex if i set it to error.php it will just still load index.php as that is what it is set in apache config file..very confusing...can anyone help please? [code] ErrorDocument 400 /error.php?error=400 ErrorDocument 401 /error.php?error=401 ErrorDocument 402 /error.php?error=402 ErrorDocument 403 /error.php?error=403 ErrorDocument 404 /error.php?error=404 php_value magic_quotes_sybase off php_value magic_quotes_gpc on php_value magic_quotes_runtime on DirectoryIndex index.php [/code] thanks destramic
  6. [code] $query = "SELECT news_id,     game_id,                 subject, DATE_FORMAT(date, '%d/%m/%y %r') AS date  FROM news  WHERE status = 'Active'  ORDER BY news_id ASC  LIMIT 5";   // Execute query $result = $mysqli->query($query); // Check query execution if ($result) { while ($row = $result->fetch_array()) { $news_id = $row['news_id']; $game_id = $row['game_id']; $subject = $row['subject']; $date    = $row['date']; $todays_date = gmdate("d/m/y"); if ($todays_date == $date) { echo "Today [time]"; } echo "<img src='".$document_root."/images/game_icons/".$game_id.".gif' alt='' width='16' height='16' />\n"; echo "<a href='news.php#news_id=".$news_id."'><strong>".$subject."</strong></a> ".$date."\n"; } // Free result $result->close(); } [/code]
  7. nope sorry it didnt work..cause what im trying to do is if the pnews post date is the same as todays date i want it to display today and time. thanks
  8. i have a date from my mysql database DATE_FORMAT(date, '%d/%m/%y %r') AS date which formats: 03/11/06 10:19:26 AM but what i would like to do i check if the date is the same date as today. $date    = $row['date']; echo $todays_date = gmdate("d/m/y"); if ($todays_date == $date) {     echo "Today [time]"; }
  9. having problems with images being displayed on my apahce server... and i know that the source to the image is correct echo "<img src='".$document_root."/images/game_icons/".$game_id.".gif' alt='' width='16' height='16' />\n"; can someone help me please? i dont understand whi this wouldnt work...nothing has changed to my file structor and now when ive installed apache i cant get images to apear? thanks
  10. maybe this is a stupid question...but how would i shut down apahce (php and mysql) so that when windows loads apache isnt on....and so i could start apache when i wanted to use it? thanks destramic
  11. bah typo..im not sure on what you would call the script...but when you view forums you'll see nav location eg this tread is at: PHP Freaks Forums > PHP and MySQL > PHP Help > php nav menu hope that clears things up
  12. thank you very much...i installed apache2 and php5 now it all works fine...only probelm i have now is when i was installing mysql5...i seem to have the problem of ext php_mysqli.dll loading Fatal error: Class 'mysqli' not found in D:\www\core\database\connect.php on line 14 the semi-colon has been taken off in php.ini and ext dir is set correct..help? thanks
  13. ive seen this done before...but im not sure how it is done..basically im wondering how you get a vav function for your website. ei: Home >> News Administration Control Pannel >> Add User be greatful if someone could point me in the right direction please..thank you.
  14. can anyone help please?
  15. i have added these lines to my httpd.conf LoadModule php5_module "c:/Server/PHP/php5apache2.dll" AddType application/x-httpd-php .php PHPIniDir "C:/Server/PHP" and it dont seem to work...when i try to restart apache it says "operation failed" but when i remove those 3 lines its alright..and has no errors....can anyone please help on this matter? regards
  16. that should work [code] <input name="username" type="text" id="username" value="<?PHP echo $_POST['username']; ?>"> [/code]
  17. doesn't seem that you are closing your else brace, try this. [code] <?php if ($submit) {   $tomail = "sales@phulldesigns.com";   $replyemail = "sales@phulldesigns.com";   $Name = $_POST['Name'];   $EMail Address = $_POST['EMail Address'];   $Telephone = $_POST['Telephone'];   mail($tomail, "Masiv Studio's Form Queried", "An interested client with the ID:($REMOTE_ADDR,REMOTE_HOST,HTTP_USER_AGENT) has entered the following information with regards to an interest with Phull Designs and Masiv Studios.<br><br><b>Name:</b>$Name<br><b>E-Mail Address</b> $Email Address<br><br><b>Telephone:</b> $Telephone<br><b>, "Content-Type: text/html; charset=\"ISO-8859-1\"\nFrom:$replyemail\n");   echo "The data entered has been sent to the Sales Team @ Phull Designs. Please allow up to 48 hours for a reply.."; } else { ?></p>         <p class="style5"><strong>Please Note:</strong> For security reasons, your IP will be sent. Please see our <a href="privacy.html">privacy policy</a> for more details. </p>         <table width="71" border="0" align="right">           <tr>          </tr>         </table>       </form>              <table width="815" border="0">         <tr>           <td width="800" height="3"><img src="images/h-line.png" width="800" height="1" /></td>         </tr>       </table>       <p class="style2"><span class="style4">Web</span> | <span class="style3">Links</span> </p>       <p class="style1"><a href="http://www.masivstudios.com">Masiv Studio's</a></p>     <p class="style1"><a href="http://www.phulldesigns.com">Phull Designs </a></p>     <p class="style1"> </p></td>   </tr>   <tr>     <td bgcolor="#CCCCCC"><div align="center"><span class="style1">| - © Copyright 2006 Phull Designs. All Rights Reserved. - | </span></div></td>   </tr> </table> </body> </html> <?php } // close else brace ?> [/code] hope this helps...if it doesnt could you paste over the code for line 61.
  18. from what i see the problems is where you have a space in your variable. [code] // incorrect $EMail Address = "name@domain.co.uk"; // correct $email_address = "name@domain.co.uk"; [/code] hope that works now.
  19. k thank you..but this is the mysql error im getting [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--] ALTER TABLE `games` CHANGE `status` `status` ENUM( 1 ) NOT NULL DEFAULT '0' #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1) NOT NULL DEFAULT '0'' at line 1 [/quote]
  20. k i have a field in my table but i want to know what type to set my news status as: have a field called "status" for my news either it should be a field that contains the value true or false ie. 0 or 1 or on the other hand i could have the value "Active" or "Inactive" what field type would be the best for this and what would be the best way? thanks..how comeone can help me on my query
  21. i have apache on my computer and i want to find the ip to my server, so i can have my domain at ukreg located to my apache server.... is this possible? help please? thanks destramic
  22. erm got it working...i did a typo =/ gulp! thanks!
  23. i did this: extension_dir = "C:\Program Files\Apache Group\Apache2\php5\ext" in my php.ini the when i restart i says unable to load C:\Program Files\Apache Group\Apache2\php5\ext\php_mysql.dll
  24. the only thing i can see in my php.ini is: ;extension=php_mysql.dll so i removed the semi - colon and not worked then when i restarted my apache it says it cans load the moduel destramic
  25. i have: apache 2.1 php 5 mysql 5.1 phpmyadmin i have a probelm now with my phpmyadmin: cannot load mysql extension; please check PHP configuration can anyone help me please?
×
×
  • 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.