-
Posts
251 -
Joined
-
Last visited
Never
Posts posted by Tandem
-
-
strip_tags() will remove any html tags from a string if thats what you need.
-
I reccomend paying for it personally, it's definitely worth it. Google go-daddy, i hear they are good but they are expensive. I personally use IXwebhosting, but there support is terrible, but they're real cheap.
However hosting choices aren't really php related, so i suggest you do a google search about that, and use this forum when/if you need help coding php. Good luck. -
I'm sorry that's not what i mean, i just want to be able to take some specific text off of the other page, and put it onto mine... is that possible?
-
All i want is the data displayed.
For example, lets say i just wanted to display the "orderno" on it's own on an otherwise blank page, without any of the other info. How would i do that? -
I'm trying to implement part of a web page, into one of my own webpages.
More detail:
https://daopay.com/svc/numgen?appcode=41970&orderno=yes&format=hash&country=GB&price=1.0
from that page, i want to implement the "orderno" into a page of my own. Is this possible? and how?
Note: i have no control over the page at the above URL, but the layout of it will not change.
Thanks in advance for any help.
-
I'm trying to detect whether somebodies form input, is the same as their session variable $_SESSION[username], regardless of case sensitivity.
I asked somebody about this a long time ago, and they told me to use eregi, however i'm not having a slight problem with this.
if $_SESSION[username] is "Tandem", and the form input is, for example, "TandemX", the eregi will still detect it.
Here is a more in depth example:
$_SESSION[username] is Tandem btw.
[code]
$blah = "TandemX";
if (eregi("$_SESSION[username]", $blah)) {
echo 'match';
}[/code]
This would echo "match". I'm not sure whether i need to use a different function altogether, or if i need to change it somehow, but i would be grateful for any help.
Thanks in advance, and please point out any errors i have made. -
I think you are both misunderstanding me. I'm gonna go into way more depth so you can get more of an uderstanding of where i'm coming from. Sorry for not just doing that in the first place.
Ok. A few months ago i made a message board/forum. I'm now currently trying to make it so that the number of topics displayed on a single page is limited.
To display the topics i use (This is very simplified from the real thing):
[code]
$get_topic_details = mysql_query("SELECT * FROM FORUM");
for ($i = 0 ; $i < $number_of_topics ; $i++) {
$topic_details = mysql_fetch_array($get_topic_details);
echo "$topic_details[1]";
}[/code]
This cycles through the rows., and echo's $topic_details[1] which would be the title or something. But now i want to create different pages showing the topics that have fallen below the top 30, showing 30 topics per page. I want to be able to start the mysql_fetch_array at row 30, or or any other number i may need to start it at. How would i go about this. Please say if you need more detail. -
Thanks for the reply.
Thats not what i meant, i probably should have gone into more detail, sorry about that :P
I'm using a for loop to pull multiple rows from a table and display them in order, via Select * from....etc. But now i need to start the process from a certain row. Is there any way to do that? -
Is there anyway to specifiy a certain row number for mysql_fetch_array? Or do i need a different function all together?
-
Again, thanks for the reply.
When i change it to LEFT JOIN i still get the same result.
Let me try to explain again, as i missed a few words and made a few typos in my last post.
I'm just going to say it how it is instead of theoretical :P
This is for a game where players can earn 'cash'. I have two tables, one called MEMBERS, and one called BANK. Every member has a record in MEMBERS. One of the fields in MEMBERS is CASH, which is how much 'cash' they have. Members can choose to put their 'cash' in the 'bank', and upon doing so will have a record added to the table BANK. The field from this table where there 'cash' is stored is called BANKED.
I want to create a score board showing who has the most total cash in descending order. So for the players who have records in BANK, there total would be CASH + BANKED, and everyone elses total is just CASH.
I hope this makes sense. -
Thanks for the reply.
What if the situation changed. Let's say that not all players had records in Table 2, but i wanted the results to show who has the total number.
So for example if somebody had no record in table 2 nut his 'Number 1' was higher than anyone elses, and was higher than anyone elses Number 1 and Number 2 combined, they would be at the top.
Please say if this doesn't make sense. -
Hi. I'm trying to use records from two tables to try to make a sort of score board. I'll try to explain the situation as thoroughly as possible.
Table1 has the following fields: Username, Number1
Table 2 has the following fields: Username, Number2
Every user has an entry into both tables. I want to add up Number1 and Number2 for every user, and then order in descending order, so i can make the score board from this information
How would i go about doing that?
Any help appreciated. -
Thanks alot, thats what i wanted to know :)
-
Surely that would just produce another 0?
I ended up just doing it from the database, but i would still like to know just for knowledge purposes :P -
Ok here is a theoretical example.
<?
$id = mysql_insert_id();
$query = mysql_query("INSERT INTO BLAH (ID) VALUES ('$id')");
echo "$id";
?>
If i do this it, the echoed $id will be 0. I want to be able to echo the actual number that was put into the database. Is there anyway of doing this without going into the database or would i have to? -
I want to be able to echo the number that the mysql_insert_id() function is producing. What's the best way of keeping the number that it produces, without having to pull it out of the database? (if this is possible)
Any help is appreciated. -
Might be because you left the '<' off of the closing title tag.
-
Hi, on my site i want to try and stop users from inputting a certain phrase i.e their own username, into a particualr form input. However users can get around what i have put in place by inputting their username in a different case or combination of cases. What would be the best way to detect whether they have input the particular word, in any case?
-
Ahhh, ok thanks Corona, that's exactly what i needed.
-
Yes it is. How would you suggest i insert different id's?
-
I'm trying to use a for loop to insert records into my database. Here's some theoretical code:
[code]for ($i = 0 ; $i < $num ; $i++) {
$id = mysql_insert_id();
$do_insert = mysql_query("INSERT INTO BLAH (ID) VALUES('$id')");
}[/code]
when i do this, only 1 record is inserted, no matter what the value of $num ($num is always a posive number above 0 btw).
What should i do to make it insert the right numbr of records?
If you don't understand me or need more info just say.
Any help appreciated. -
Thanks, that was really helpful!
-
I was wondering, is it possible to select records from two different tables in one query?
If so can somebody show me a theoretical example? I would like to use this for a php script.
Thanks in advance fo any help. -
That gives the same result. I'm gonna send a message to my host and see if they know what is wrong.
Taking content from other pages...
in PHP Coding Help
Posted
https://daopay.com/svc/numgen?appcode=41970&orderno=yes&format=hash&country=GB&price=1.0
I want to be able to display number after "orderno=" onto one of my webpages. The number changes every time you load the page, and sometimes changes in length too.
Is it possible to somehow grab it from this page and put it onto my page?