Jim R
Members-
Posts
988 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Jim R
-
I see the html header information now, but to the newb eye, it all reads like normal PHP.
-
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.
-
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.
-
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); ?>
-
Made the changes. Still not working.
-
WOW...thanks. Sometimes little things mean a lot.
-
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);
-
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.
-
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.
-
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.
-
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.
-
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.
-
I tried multiple ways, and it either ignored the statement or gave me a syntax error.
-
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.
-
Nice.
-
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".
-
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.
-
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.
-
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.
-
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.
-
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)
-
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?
-
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.
-
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.
-
Is that the best way to do that? They are all confined in one table.