Jump to content

wildteen88

Staff Alumni
  • Posts

    10,480
  • Joined

  • Last visited

    Never

Everything posted by wildteen88

  1. You may be better of using a client side language (such as Javascript) if you want a live count down counter. You could do it in PHP however the count down wont be live. You'll have refresh the page for the counter to update.
  2. What are you wanting to archive to? Can you please explain more.
  3. Yes. That is all you can do. You cannot override how browsers handle cookies. If you have set your cookie with an expired date the browser should not send the cookie on the next page request.
  4. cookies cannot be deleted. You can only set invalid cookies. The browser will not send cookies which have been expired.
  5. You're original code was fine. It Just needed a few minor adjustments $old_string = '<a href="some/unknown/path/here.file">unknown_filename.file</a> hey man some more text <a href="some/here.file">ipppy kwoejmajnd.file</a> '; $new_string = preg_replace("/(>(.*)<\/a>)/i", ">Download</a>", $old_string); echo $old_string; echo '<hr/>'; echo $new_string;
  6. the img function does not load your images from your views/ folder. Instead it loads your images from your sites root, eg echo img('basic registeration system/images/img.jpg',TRUE); will output the following HTML <img src="http://yoursite.com/basic registeration system/images/img.jpg"> You should place all your images outside of your application/ folder, as shown here
  7. These effects are possible by the use of avascript frameworks such as prototype, mootools, jquery etc
  8. You can place your images etc within separate folders too if you wish. The folders must be in the same directory as your index.php file though. You should not be putting any static content anywhere in your application folder. I tend to setup my CI directory structure like so My CodeIgnitor App | +-- System/ | +-- Application/ | +-- static/ | | | +-- images/ | | | +-- js/ | | | +- style.css +- index.php When loading say style.css within my views for example I'd use <link rel="stylesheet" type="text/css" href="<?php echo base_url().'static/style.css'; ?>" />
  9. Your host has a setting called open_basedir enabled. This setting restricts you from accessing certain locations on the server. Currently you are only allowed to access the following locations: /home/ /usr/lib/php /tmp You cannot override this setting. What are you trying to do?
  10. mysql_real_escape_string should only be used on strings to make them safe for insertion. If all you want is a number then the OP code should be sufficient.
  11. $prevCat = null; while($row = mysql_fetch_array($sql)) { if($prevCat != $row['category']) { echo '<table class="mainTable">'; echo'<tr> <th class="categoryTitle" colspan="2">'.$row['category'].'</th> <th>Topics</th> <th>Posts</th> </tr>'; $prevCat = $row['category']; } echo'<tr> <td class="boardUpdate"> <img src="" /> </td> <td class="boardTitle"> <p><a class="bold" href="board.php?id='.$row['bid'].'">'.$row['title'].'</a> <p>'.$row['description'].'</p> </td> <td class="boardTopics"> <p>'.$row['topicCount'].'</p> </td> <td class="boardPosts"> <p>'.$row['postCount'].'</p> </td> <td class="boardLastInfo"> <p>Last Post Info</p> </td> </tr>'; if($prevCat != $row['category']) { echo '</table>'; } }
  12. Change if(move_uploaded_file($_FILES['userfile']['tmp_name'],$upload_path . $new_file_name)) { header("Location: http://mysite.com/members.php?cmd=success"); } if(move_uploaded_file($_FILES['userfile2']['tmp_name'],$upload_path2 . $new_file_name2)) { header("Location: http://mysite.com/members.php?cmd=success"); } to if(move_uploaded_file($_FILES['userfile']['tmp_name'],$upload_path . $new_file_name) && move_uploaded_file($_FILES['userfile2']['tmp_name'],$upload_path2 . $new_file_name2)) { header("Location: http://mysite.com/members.php?cmd=success"); }
  13. Post your existing code here. Should be able to adapt your existing code for what you want
  14. Mamp should setup the AMP stack for you. What do you mean MAMP doesn't work can you explain the issues you're having The other alternative is to compile Apache PHP and MySQL yourself.
  15. You should place all your static files (css, js, images etc) where your index.php file is.
  16. Errors wont be logged within that file, access.log files just log all connections to the server. You'll need to find your error.log file. The error log maybe logged elsewhere you should get in contact with the person that setup Apache originally.
  17. Do you have access to Apache? If you do Apache by default logs errors to the error.log file within your logs/ folder
  18. Change foreach( $_SESSION['jobs'] as $job => $value){ $result = mysql_query("SELECT * FROM culvercareers.positions WHERE position_id='$value'") or die(mysql_error()); $row = mysql_fetch_array( $result ); $job_title = $row['position_name']; echo "$job_title<br>"; echo "<textarea cols='45' rows='5' name='job_xp'></textarea>"; [b]echo "<input type='hidden' name='job_code' value'$value'>";[/b] echo "<p>"; } to $i = 0; foreach( $_SESSION['jobs'] as $job => $value) { $result = mysql_query("SELECT * FROM culvercareers.positions WHERE position_id='$value'") or die(mysql_error()); $row = mysql_fetch_array( $result ); $job_title = $row['position_name']; echo "$job_title<br>"; echo "<textarea cols='45' rows='5' name='job[$i][xp]'></textarea>"; echo "<input type='hidden' name='job[$i][code]' value'$value'>"; echo "<p>"; $i++; } Now change $_SESSION['job_xp_info'] = $_POST['job_xp']; foreach( $_SESSION['job_xp_info'] as $job => $value){ mysql_query("INSERT INTO culvercareers.applicant_xp (app_id, user_id, job_xp, [b]job_code[/b]) VALUES ('$app_id','$userid','$value','[b]$job_code'[/b])") or die (mysql_error()); to: $_SESSION['job_info'] = $_POST['job']; foreach( $_SESSION['job_info'] as $job) { mysql_query("INSERT INTO culvercareers.applicant_xp (app_id, user_id, job_xp, job_code) VALUES ('$app_id','$userid','{$job['xp']}','{$job['code']}'") or die (mysql_error()); } [/code]
  19. Have a look in Apaches error logs.
  20. Do you mean patches to Apache? To upgrade Apache just download a new release when its available. Upon installation the installer should give you the option to upgrade. Alternatively just backup your conf/ and/or htdocs/ folder(s) and uninstall Apache completely and then install your newer version. Once installed overwrite the new conf/ and/or htdocs/ folder(s) with your previous one(s).
  21. For JPG you'll need to make sure you have the following configure flag when compiling PHP --with-jpeg=<path/to/jpg-library> You'll need to use a similar path for PNG too. More Info
  22. Here: .tool a:hover{ border: none; background: url(toolbox/bkgrnd.png) no-repeat 0px -30px; } .tool a:active{ border:none; background: url(toolbox/bkgrnd.png) no-repeat 0px -60px; } You're applying the background image to your links and not your .tool div. You may need to change your code to .tool:hover{ border: none; background: url(toolbox/bkgrnd.png) no-repeat 0px -30px; } .tool:active{ border:none; background: url(toolbox/bkgrnd.png) no-repeat 0px -60px; } However not all browsers support pseudo classes on elements other than links.
  23. You should try to avoid using short tags (<? ?> <?= ?>) within your scripts. Short tags are depreciated and are not recommended. Hence why they are disabled by default. You should note they are soon to be removed completely as of PHP6. I would highly recommend you to convert your scripts to use the full PHP tags. However you can enabled them by setting the short_open_tag directive to On within your php.ini
  24. The main place would be your php.ini or you can set it during runtime in your PHP script.
×
×
  • 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.