Jump to content

Jim R

Members
  • Posts

    988
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Jim R

  1. I see the html header information now, but to the newb eye, it all reads like normal PHP.
  2. Had the / going the wrong way. It should be \. This is why I'm not really a coder. I'd be on suicide watch if this stuff was my job.
  3. There isn't really anything that explains when to use double vs. single quotes, nor is there anything that explains <html> is set up differently. At least that is the case in the first parts of that page. Hard to tell what applies as the page continues, since there is a lot of other types of codes. In section 3 of the page you linked, the part marked with <html> looks a lot like it's set up like PHP. It's in the $message variable between single quotes.
  4. It's carrying the values, which is good, but it's not recognizing any of the spacing. In what you provided, it just prints the /n/r. I changed it to <br>, and it just prints that too. Here is what I'm using as of the moment. <?php // The message $message = $_POST['nameFirst'] . $_POST['nameLast'] ." has entered the fall league.<br>"; $message .= $_POST['school'] . '<br>'; $message .= $_POST['email']; // In case any of our lines are larger than 70 characters, we should use wordwrap() $message = wordwrap($message, 70); // Send mail('basketball@metroindybasketball.com', 'Fall League Registration', $message); ?>
  5. Made the changes. Still not working.
  6. WOW...thanks. Sometimes little things mean a lot.
  7. I can't get any of the variables to work in the $message variable. The regular text prints in the email, but that is all. <?php // The message $name = $_post['nameFirst'] . ' ' . $_post['nameLast']; $school = $_post['school']; $email = $_post['email']; $message = "$name"; $message = "has entered the fall league."; // In case any of our lines are larger than 70 characters, we should use wordwrap() $message = wordwrap($message, 70); // Send mail('basketball@metroindybasketball.com', 'Fall League Registration', $message);
  8. I would have started with your last line, as it is I didn't catch the mail() being a link. Thanks, I'll get a look at it tonight.
  9. Here is my PHP prowess. I can take what I see, make sense of it and make it really do what I want. In calling the mail() function, I'm not sure how to make it work. I'm heading out for now and will search later. Is there a good place to start in seeing how it's coded? Thanks.
  10. Upon submitting my form, the User is taken to dbenter.php, where it accurately inserts information into my database and redirects my User to the next step. The problem I'm having is I'm not sure how to send their form results from that PHP page. I've searched the web and here, but most of what I find are people asking about sending emails to the User. I just want the results sent to me. Thanks.
  11. I'm trying to have my WordPress site recognize my SMF user information, specifically what Membergroup they are in. I'm using SMF's SSI functions, but I'm not having much luck. The code I'm using determines which Membergroups can see content. From there it is to determine whether or not the User is a Guest, Registered or a Subscriber. It works perfectly on my own PHP pages, but I'm wanting to move over to WordPress for better functionality. I can kind of start from scratch, but I'd rather not. There are not any suitable bridges or converters that I have found to work. Here is the code: <?php $allowed_groups = array(1, 2, 9, 14); $can_see = FALSE; foreach ($allowed_groups as $allowed) { if (in_array($allowed, $user_info['groups'])) { $can_see = TRUE; break; } } //If allowed to see...show this. if ($can_see) { //Just stay right here and do nothing. } elseif ($can_see == FALSE && $context['user']['is_logged']) { //If you want to redirect the user to another place you can use the redirectexit() function. echo 'Registered but not subscribed.'; } else { //Just redirect since they are just a guest. echo 'Not registered.'; } ?> Here are the errors: Note, that I'm allowing four Membergroups access, and I'm getting four errors. I switched it to three Membergroups, and it produced three errors. As you can see by the "Not registered" at the end, it just bypasses that the User is Registered or a Subscriber. Again, this works on my own PHP pages.
  12. Ok...when I say error, I just mean within the SQLyog program I use to view and query my databases. Sorry that I omitted that point.
  13. I tried multiple ways, and it either ignored the statement or gave me a syntax error.
  14. So is this the most concise way to write this: SELECT * FROM wikirecentchanges WHERE rc_title LIKE '%\_%' AND rc_title NOT LIKE '%Main%' AND rc_title NOT LIKE '%20%' I tried commas. It didn't work.
  15. I was getting ready to post that the query was returning all the values, but escaping the underscore made it work. Thanks to you both. Is there also a way to make it omit other key words, like "main" or "page".
  16. if === *_* Not that it's the proper syntax, but I'm wondering if I can extract values that only have an underscore in the field of data.
  17. Yes, but that just takes you to the page. I just want to extract or parse the user edited information. The Wiki URL looks like this actually pathway/index.php?title=wordA_wordB_wordC. In my case it's nameFirst_nameLast, which takes the user to a page with essentially a profile on that player, edited by the users. I'd like to just use the profile part.
  18. Ken, this is related to the topic you've responded to of mine over on the MySQL board. Here is the code: echo '<tr> <td>'. $line['deviation'] . '</td> <td><a href="/wiki/index.php?title=' . $line['nameFirst'] . '_' . $line['nameLast'] .'" class="thickbox" >'. $line['nameFirst'] . ' ' . $line['nameLast'] . '</a></td> </tr>';} In each instance, I'm creating a link with a Thickbox class, and I'd like to display the content of the Wiki page in the Thickbox rather than go to the page. However, I just want the user generated content from the Wiki page. Perhaps, the link instead links to a URL which parses and echoes content from the Wiki page. Just not sure how to do that.
  19. The "code" is already up there, and it has plenty of queries, exactly three. That's the point. Is there a more concise way of doing it? The answer is probably yes, which is why I'm asking. Ken, I no longer have the example I referred to because it wasn't yielding what I wanted.
  20. Here is where the newbie in me comes out. I'm a basketball coach with an English degree, so terminology is very important to me. In theory, am I looking for something that "parses" the information I want? (as opposed to extracts it)
  21. Any more detailed advice on how to go about that? I've tweaked a lot of SSI stuff on my SMF forum, so I can picture in my mind what you're saying, but SMF sets up most of that code. I just tinker with it. What direction should I go in regards to my Wiki?
  22. I'm using a jquery modal window (Thickbox or another one). What I'd like to do with my PHP code is when the link clicked on, the content that shows up is just the content portion of my Wiki page--the part that actually is "edited". No menus. No navigation. Just the part I or a user would type.
  23. I'm not sure of the logic of the code as you describe it. I tried to do them all with the same SQL (before I switched what section 2 queried), and it printed the Header for the second section every time too.
  24. Is that the best way to do that? They are all confined in one table.
×
×
  • 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.