TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 11-24-2008, 09:21 AM   #1 (permalink)
The Visitor
Newcomer 
 
Join Date: Nov 2008
Posts: 1
Thanks: 2
jetnet1 is on a distinguished road
Default problem getting data from the html table

hello everyone,im new in this site......

and im starting to study in web programming..

i have a little bit problem with the table and i dont know how?...
please help me....

this is my problem......

i want to get a data on the html table but i dont know how.....

example:
<table>
<tr>
<td><a>me</a></td>
</tr>
</table>


i want to get to me data so that i can filter it content
but i dont know how to get the data which is on the html table row....

$result = mysql_query("Select * from exer where field1='[i dont know how to get the data on the html table]");

please help me....

thank you in advance.........................
jetnet1 is offline  
Reply With Quote
Old 11-24-2008, 11:47 AM   #2 (permalink)
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
Tanax is on a distinguished road
Default

My tip: Read the descriptions of the different forums so you know which one to post in, because this is totally in the wrong section.
__________________
Tanax is offline  
Reply With Quote
The Following User Says Thank You to Tanax For This Useful Post:
jetnet1 (11-25-2008)
Old 11-24-2008, 06:55 PM   #3 (permalink)
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

Whilst Tanax is right about this being in the wrong forum, let me at least have an attempt at answering your question. The small job of moving the thread elsewhere will take me a second at most, so don't worry about that at all!

To get that data in the table you're going to have to use regular expressions, something like the following should get you the "me" text. $szData is the item which contains the HTML table, and perhaps other information also.

php Code:
if (preg_match('~<td><a.*>(.+?)</a></td>~is', $szData, $aMatches))
{
    echo 'Text item = ' . $aMatches[1];
}

Please keep in mind, if the table item differs then the regular expression used here will also need to be modified to compensate for that.

Last of all, a warm welcome to TalkPHP! I hope this helps you.
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote
The Following User Says Thank You to Wildhoney For This Useful Post:
jetnet1 (11-25-2008)
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 09:57 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design