Jump to content

Boo-urns

Members
  • Posts

    144
  • Joined

  • Last visited

    Never

Everything posted by Boo-urns

  1. Apache needed to be restarted even though I just transferred everything, and that fixed the problem. Ugh what a headache, thanks for your help!
  2. Yea I know it should work which is weird it has to be something with the file I'm guessing. I did try a redirect with PHP on another page and it worked fine, not sure why this would be held up. Yea renting a server and domain. PHP is 5.2.6 Could some javascript be getting in the way?
  3. Hmm...that wasn't the problem.I took out all programming except for: <?php if(isset($_POST['submitForm'])){ //redirect to this page but w/ submitted header("Location: http://subdomain.domain.com/test-sites/register.php?success=true"); }//end of submit ?> Corresponding button = <input type="submit" name="submitForm" id="submitbutton" value="Submit" />
  4. The problem was I had a <?php if($error != 1) { header("Location: next.php"); } ?> But i never initialized the value, only if there was an error, never had that problem before but now I must initialize it. Hope this helps someone with this problem.
  5. Alright well thanks for the info about the header line being correct. As, I commented out the whole form submission and it still had the delay. Could it be a server issue?
  6. You'll need to use javascript to do what you are wanting. If you are using jQuery it would be <script type="text/javascript" language="javascript"> $('#posActivity').change(function(){ var selectedOption = $(this).val(); switch(selectedOption) { case "Abseiling Table Mountain": $('#secondBox').load('includes/abseilingMountain.php'); break; } }); </script> Or if the second box is a dropdown you could do a show on it. I'm also sure there is a way with plain javascript except I don't know off the top of my head hopefully this helps ya out.
  7. I can't give the exact path but here is the gist of the header header("Location: http://subdomain.domain.com/test-sites/register.php?success=true");
  8. I just moved my test site to a subdomain, and now the header redirect is not working. I changed it from relative to absolute path and it is only working some of the time, otherwise it will take roughly 122 seconds in FF3 to do the redirect. I did check out all of my form post / database submission and it turned out just to be the header redirect. Has anyone experienced this and any suggestions? Thanks
  9. I believe you could be correct on the first query calling to display all fields. Here is what I usually do when I am doing just php pagination: <?php // Define the number of results per page $max_results = 5; // Figure out the limit for the query based // on the current page number. $from = (($page * $max_results) - $max_results); // page is exactly like your 'pageno' variable just getting it from the URL // Perform MySQL query on only the current page number's results $sql = mysql_query("SELECT * FROM contract_status ORDER BY station_id DESC LIMIT $from, $max_results"); ?> then in your document: <?php while($row = mysql_fetch_array($sql)){ //echo your information you need } // Figure out the total number of results in DB: $total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM contract_status"),0); // Figure out the total number of pages. Always round up using ceil() $total_pages = ceil($total_results / $max_results); // Build Page Number Hyperlinks echo "<br />"; // Build Previous Link if($page > 1){ $prev = ($page - 1); echo "<a href=\"".$_SERVER['PHP_SELF']."?page=$prev\">"."<< "."Previous</a>"; } for($i = 1; $i <= $total_pages; $i++){ if(($page) == $i){ echo "<a href=\"".$_SERVER['PHP_SELF']."?pageno=$i\">$i</a> "; } else { echo "<a href=\"".$_SERVER['PHP_SELF']."?pageno=$i\">$i</a> "; } } // Build Next Link if($page < $total_pages){ $next = ($page + 1); echo "<a href=\"".$_SERVER['PHP_SELF']."?pageno=$next\">Next >></a>"; } ?> I didn't test this code so i'm not sure if it works perfectly but it is the basis of the pagination tutorial phpfreaks had. Hope this helps!
  10. Any non alphabetical characters mainly so like 08 food1 skip to the f in food. or "food" skip the quotes.
  11. Hmmm... The first option might work bascially what I will be doing with the data being presented is to paginate all of them and there are over 2000 rows so I don't know how quick that would be. I wasn't sure if there was a mysql function or term that I could use that I was unaware of.
  12. I was wondering what the method would be to skip certain characters in a sort by? SELECT name FROM foods WHERE viewable='Y' ORDER BY name ASC How would i skip it if the first character in the name column starts with a quote or numbers to skip to their first character? Thanks for your help! Corey
  13. Thanks! %$title works perfectly! =D
  14. I'm trying to get a search where the user enters in anything say "hat" I want to search a subject that contains "hat" but not "what" I can get the results just fine however I'm still pulling in the "what" <?php $message_query = "SELECT * FROM messages WHERE title LIKE '$title' AND viewable='Y'"; ?> I've also tried using \_ but am unsure on the proper usage as i'm trying to just find a string that finds that exact word. Thanks Corey
  15. Ahhh finally thanks everybody, thanks for making me go back and check yet again as i did have a typo :-/
  16. I've tried it both ways from thorpe and pocobueno1388 and i get the same error Status: 404 X-Powered-By: PHP/5.1.6 Content-type: text/html No input file specified. I also tried it through the browser and it worked properly. Any ideas?
  17. hmmm well now i'm getting this: Status: 404 X-Powered-By: PHP/5.1.6 Content-type: text/html No input file specified. The file is uploaded and everything, the php file is just going to go through the member db table and check to see that their account has not expired yet.
  18. Hi, I have been searching tutorials and posts about how to do cron jobs, i know how to sorta set it up in cpanel however how would i tell it to execute the php file? When i get the e-mail it says: "/bin/sh: /usr/bin/wget: Permission denied " i do have the permissions at 755 any idea what is wrong? Thanks Corey
  19. setcookie("user", $u, time()+1800); setcookie("pass", $p, time()+1800); //retrieve if(isset($_COOKIE['user'])){ $username = $_COOKIE['user']; }if(isset($_COOKIE['pass'])){ $password = $_COOKIE['pass']; }
  20. So I have a session that works just great, then i send them to paypal for payment, bring them back and the only way i could think of how to do it was through COOKIES so i set one up before they went to processing. I come back they get logged in fine but at the bottom of the page i get this error. Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. I don't have access to the PHP.ini file so how would i turn it off in the .htaccess page? Thanks in advance Corey
  21. Thanks for showing me that I forgot to put in the JOIN statement. I do want the age to just show the age inputted not 11, 13 etc.. if i input 1 would it i need to do p.PetAge LIKE '$petAge%' ? Thanks again
  22. First off, i'm not positive what the best way to JOIN the tables would be. The first table has all the membership information name / location / that kind of stuff. The second table contains their pet(s) if they have inputted any, and their unique user ID is passed to a petID (that also has a uniqueID for that) On my search I'm getting multiple repeats of the same member. I'm not sure why i'm getting so many rows outputted as I've checked the loops here is my code: <?php // of course I'm getting all the variables and connecting to the db above this statement $result = mysql_query("SELECT * FROM member, pet WHERE member.age LIKE '%$age%' AND member.state LIKE '%$state%' AND member.city LIKE '%$suburb%' AND member.postcode LIKE '%$postcode%' AND pet.petAge LIKE '%$petAge%' AND pet.petType LIKE '%$type%'"); ?> <?php //in the html if(mysql_num_rows($result) > 0) { while($u=mysql_fetch_array($result)){ $userID=$u['id']; $userAge=$u['age']; $state=$u['state']; $city=$u['city']; $zip=$u['postcode']; // Pet info $petAge = $u['petAge']; $petType = $u['petType']; $petBreed = $u['petBreed']; $petGender = $u['petGender']; //display the result (At the moment I'm just displaying this, I entered in city and state that only 1 member has and it repeated echo "<td align='left'><a href='profile.php?id=$profileID'>$petName</a><br />Type: $type<br />Location: $city, $state</td></tr>"; } } ?> It is repeating the echo 14 times! Agh! Thanks for your tips in advance to get this to display correctly
×
×
  • 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.