217 Posted Topics

Member Avatar for bgharper

Try this: [PHP] $query = "SELECT * FROM comments WHERE archive_id = '$archive_id'"; echo $query; exit(); $res = mysql_query($query); while ( $result = mysql_fetch_assoc($res) ) { $date = $result["date"]; $name = $result["name"]; $comments = $result["comments"]; echo "$date, $name, $comments"; }[/PHP]

Member Avatar for Troy
0
191
Member Avatar for bwest

You have to have minimum three rows to get results with full text indexes. Really, you want more than that to get decent results. Thing is, MySQL tries to be smart and automatically ignores words that are in 50% or more of the rows. The idea is that if you …

Member Avatar for Troy
0
128
Member Avatar for jime0726

I have written 2 PHP classes that may be beneficial for your project, jime0726. For each, I have also written an article explaining how to use the code with plenty of examples. [b]PHP Database Class with Caching[/b] [url]http://www.tgreer.com/class_db_php.html[/url] This class provides a common interface to MySql, Postgres, and MSSql. HOWEVER, …

Member Avatar for jime0726
0
219
Member Avatar for mshavel@optonli

Unfortunately, I do not know about the raw MySql files, so I can't answer that question. Hopefully another guru will reply with a solid answer about that. What I can offer you is to tell you that phpMyAdmin (You do have that right?!) has an export feature that can create …

Member Avatar for mshavel@optonli
0
277
Member Avatar for stangfl

I'm quite confused both by what you say you want to do and by your code. Are you able to re-phrase this to make it clearer? For example, is the <SELECT> dropdown supposed to be [b]table [/b]names or [b]column [/b]names? How does the value of [b]$search[/b] get populated?

Member Avatar for Troy
0
138
Member Avatar for warrior062

I use Fedora Core, which is *almost* the same as Redhat. So maybe this will work for you, maybe not. I don't know how to use any of the GUI tools. At a shell prompt, as root type this: [CODE] service httpd start [/CODE] If Apache is already running, that …

Member Avatar for Troy
0
144
Member Avatar for warrior062

I just wrote a WAMP (Windows, Apache, MySql, PHP) HOWTO. It's at the bottom of this thread: [url="http://www.daniweb.com/techtalkforums/thread26579.html"]http://www.daniweb.com/techtalkforums/thread26579.html[/url] In that tutorial, you'll see how to modify which filenames Apache treats as "default" pages. But to directly answer you question, this line in your httpd.conf file defines the filenames (and order …

Member Avatar for techniner
0
107
Member Avatar for NilovSerge

Check out the top user comment listed on the PHP documentation page for mssql_get_last_message(). [url]http://www.php.net/manual/en/function.mssql-get-last-message.php[/url] It shows a possible way to get the full error message by querying it from SQL Server.

Member Avatar for Troy
0
167
Member Avatar for paradox814

[QUOTE=paradox814][php]$_SESSION['someVar'][$i] = $_POST['someVar'][$i][/php][/QUOTE] $_POST['someVar'][$i] is not valid unless your 'someVar' FORM element is an array of checkboxes or you have multiple text fields with the same name. Normally, it would just be $_POST['someVar']. Whether it is an array or not, you can just do this: [PHP] $_SESSION['someVar'] = $_POST['someVar']; [/PHP]It …

Member Avatar for Troy
0
191
Member Avatar for tyty

I'm not sure why you titled your post htpasswd and htaccess when your question is about the basics of getting PHP configured with Apache on WinXP. Anywho..... I wrote a WAMP tutorial for WinXP Home/Pro. It can be found at [url="http://www.troywolf.com/articles/wamp_howto.htm"][b]http://www.troywolf.com/articles/wamp_howto.htm[/b][/url] If you don't mind starting over, just uninstall what …

Member Avatar for Troy
0
158
Member Avatar for Yuki H.

For your mysql error, test your SQL statement. Right after your line that builds your SQL statement, do this: [PHP] echo $sql; exit(); [/PHP] Examine the output to see if something is wrong with the SQL statement. Try running it directly against your database using phpMyAdmin or the command line …

Member Avatar for val542
0
227
Member Avatar for bloodyhands35

One important (to me) difference between Home and Pro is that Home does not allow you to Remote Desktop to it.

Member Avatar for Killer_Typo
0
235
Member Avatar for Knad

What you describe sure sounds strange, and I wish I could see your site so I'd know what you are talking about, but the link you provided is not working. You said it works when user is logged in--that the problem occurs when user is NOT logged in. So, let's …

Member Avatar for Yuki H.
0
156
Member Avatar for bennetjosem

There are two things you need to do to troubleshoot this problem. INSIDE your function, at the very top, do this: First, echo out one of the arrays like this: [PHP] echo "<pre>"; print_r($Date_Added); echo "</pre>"; [/PHP] Then echo out the value of $num: [PHP] echo "<hr />".$num; [/PHP] You …

Member Avatar for senexom
0
136
Member Avatar for moosigal

PHP's official tutorial for beginners is a good place to start. [url]http://us4.php.net/tut.php[/url]

Member Avatar for Atomical
0
361
Member Avatar for stevoo

[QUOTE=stevoo]basicly i have a vbulletin forum and i am trying to create a simple web page , now the thing that i do not now is how can i obtain the current Members that are registered in the forum and show it in my web page[/QUOTE] The forum you are …

Member Avatar for Gary King
0
209
Member Avatar for ashneet

I do not understand how it would not be looping $nrow times. Please add echo() statements after most every line to output debugging information. For example: [PHP] if (!$result) { echo "<br />ERROR! result is false."; } $nrow = mysql_num_rows($result); echo "<br />nrow: ".$nrow; if ($Vh4 == "VH4") { echo …

Member Avatar for ashneet
0
285
Member Avatar for sharp_edges

Whoa, just beginning, eh? Well, you've got a ways to go, but try to enjoy the journey...and don't forget to sleep! :) The system you describe sounds similar to a forum/bulletin board system. The features restricting users to various access levels are common in applications such as phpBB and VBulletin …

Member Avatar for Troy
0
255
Member Avatar for bitfiddler

I wrote a system to do this a few years ago. You can look at what I did by going to [url]http://www.mvirony.com/[/url], then navigate to the [b]Boat Layout[/b] page. When you hit the home page, make sure you allow popups for the site. There aren't any ads or anything, but …

Member Avatar for bitfiddler
0
182
Member Avatar for katisco

The way to debug javascript is to make a copy of the full script, then remove everything but a few lines or functions. Test to see if it works. If not, remove more. Once you have a page that loads without any errors, add more code back in. Add a …

Member Avatar for Troy
0
112
Member Avatar for ZR2_S10

First of all, it sounds like you don't have any graphical interface for MySql currently. Do you have phpMyAdmin? If not, GET IT! [url="http://www.phpmyadmin.net/home_page/"]http://www.phpmyadmin.net/home_page/[/url] phpMyAdmin is a PHP browser-based MySQL Administration tool. You can create databases, table, columns, edit current data, get lists of data, import, export, etc. It's really …

Member Avatar for Troy
0
120
Member Avatar for Gnome_101

Tip: Somebody will probably reply to help you on this, but your chances of getting a reply are MUCH higher if you will narrow your problem down to the one or 2 steps where the problem actually occurs, then post only enough code to demonstrate the problem. Many times, in …

Member Avatar for Gnome_101
0
121
Member Avatar for autocrat

Oh, I remembered this post ([url]http://www.daniweb.com/techtalkforums/thread24929.html[/url]) where a product named [b]databik[/b] was mentioned. I've never used it, but it claims to do what you want. [url]http://www.dadabik.org/[/url]

Member Avatar for Troy
0
973
Member Avatar for 4BoredomDotCom

It sounds like you plan to have each joke be it's own PHP page? Joke #1: 0001.php Joke #2: 0002.php Joke #3: 0003.php ... That will work, but considering that each joke is only a small bit of text, and that you probably have a lot of other common stuff …

Member Avatar for Troy
0
106
Member Avatar for symoore22

Hey, symoore22! The problem is that session_start() has to write a cookie to the user's computer, and PHP can't write COOKIES after you start the output because once the HTTP headers are sent, cookies can't be sent. (They are sent in the headers.) So you just need to put session_start() …

Member Avatar for Troy
0
149
Member Avatar for ashneet

Check out PHP's [b]substr()[/b] function. [url]http://us4.php.net/manual/en/function.substr.php[/url] For example: [php] $zipcode = $_POST['zipcode']; $short_zip = substr($zipcode,0,2); [/php]

Member Avatar for ashneet
0
106
Member Avatar for dafabe

Senexom asks a good question--what do you REALLY want to do? You could have code such as this: [PHP] <table> <tr> <td> <?php $page_action = $_GET['a']; switch($page_action) { case "action1": echo "You chose action 1."; break; case "action2": echo "You chose action 2."; break; default: echo "Welcome to my page."; …

Member Avatar for Troy
0
115
Member Avatar for symoore22

This is the PHP forum. Please post this in the DHTML/Javascript forum. Or Forum Moderator, please move this post.

Member Avatar for darklordsatan
0
141
Member Avatar for tomasm

It appears that you have nothing that ties your tables together. I come to this assumption both from looking at your table structure and the query you posted. Anytime you have a SQL statement with more than one table, you must have something that ties the tables together. Without this, …

Member Avatar for tomasm
0
348
Member Avatar for Stick

[PHP] <?php $script_dt = date('Y-m-d'); //Modify formatting for your needs. ?> <input type="text" name="userdate" value="<?= $script_dt ?>" /> [/PHP] See [url]http://us2.php.net/manual/en/function.date.php[/url] for more about date formatting.

Member Avatar for Stick
0
174
Member Avatar for Phaelax

I [i]think[/i] I understand the functionality you are looking for. If not, I apologize now. I've never seen anything like you described. This functionality is usually accomplished using what are commonly referred to as "Lookup Tables". A Lookup Table is usually a relatively small table with usually just 2 columns: …

Member Avatar for Phaelax
0
158
Member Avatar for sm00nie

The user, of course, can delete their cookies anytime they want using the browser's tools. Web applications can only modify cookies on user computers that are within your same domain. So if your domain wrote the cookie, you can expire or change it. If the cookie is from somebody else's …

Member Avatar for sm00nie
0
92
Member Avatar for Kathrina

Wenn Sie nur numerische Daten in der Spalte speichern, bilden Sie dann die Spalte Daten-Art (INT, BIGINT, DOUBLE). Wenn Sie dies tun, sortieren die Daten numerisch. Nur gesetzt in Ihre Formatierung (Kommas, usw..) nach Ihnen ziehen Sie die Daten die Datenbank heraus. Speichern Sie die Zahlen nicht in der Datenbank …

Member Avatar for Troy
0
442
Member Avatar for sm00nie

I'm the author of those articles and the class. It is posted here on Daniweb, but the article version at [url]www.tgreer.com[/url] provides a lot more in-depth explanation of usage. sm00nie, check out PHP's stripos() function. It is what you are looking for I believe. [url]http://us2.php.net/manual/en/function.stripos.php[/url]

Member Avatar for sm00nie
0
238
Member Avatar for thei2k
Member Avatar for akoloff

Akoloff, if you want to use ASP as you mentioned, then look up ASP's Request Object. It comes in three forms that apply to your scenario: 1. Request.Querystring : to retrieve values from the HTTP GET. 2. Request.Form : to retrieve values from the HTTP POST. 3. Request : will …

Member Avatar for Troy
0
200
Member Avatar for hanpedro

Please read and follow Paradox814's post at this thread: [url="thread25821.html"]http://www.daniweb.com/techtalkforums/thread25821.html[/url] It will show you some basics of running mysql queries in PHP along with how to read the mysql errors. Use the techniques shown to modify how you run your queries. Create a page that only has the problem--nothing else. …

Member Avatar for Troy
0
109
Member Avatar for thandermax

[QUOTE=thandermax]Dear all members, I have the following specifications: 1. Fedora core 3 2. Apache 2.0.54 3. PHP 5.0.4 4. MySQL[/QUOTE] Are these specs your local machine or the remote server? On the local machine, is the httpd (Apache) service started? Is the mysqld service started? Have you created a database? …

Member Avatar for darklordsatan
0
180
Member Avatar for cmills83

Not sure why nobody replied to this earlier. I just saw it. Well, you will have data obviously. So you'll want a database. And you'll need a programming language, you already know that. You'll also need a webserver. You know that, too, of course. The architecture you use depends on …

Member Avatar for Troy
0
184
Member Avatar for cf_guy

Sorry you did not get any replies, but please follow up to let us know what you learned. Help those who come after you. Thanks.

Member Avatar for Troy
0
121
Member Avatar for markwithak

[QUOTE=zippee]if the mov value is numeric, then the code should look like if ($mov = 1). if the value is integer, the if ($mov == "1")[/QUOTE] Actually, whether it's numeric or string, the same rules apply. A single equal sign will assign a value to a variable. A double equal …

Member Avatar for Troy
0
173
Member Avatar for michael123

[QUOTE=michael123]I have a login script, I want to modify it to restrict the sharing username access, by IP address, what will be a good method to do this?[/QUOTE] What I think I hear you say is you want to be able to detect if more than one IP address logs …

Member Avatar for Troy
0
102
Member Avatar for oracle4me

Please read and follow Paradox814's post at this thread: [url]http://www.daniweb.com/techtalkforums/thread25821.html[/url] It will show you some basics of running mysql queries in PHP along with how to read the mysql errors. Use the techniques shown to modify how you run your queries. Create a page that only has the problem--nothing else. …

Member Avatar for Troy
0
239
Member Avatar for dantrujillo

This may seem too obvious, but the problem is that $result is not a valid MySQL resource. So why is that? Since your other queries work, we have to assume your connection is good. So the almost sure candidate is your query. Something is wrong with your query. Try changing …

Member Avatar for dantrujillo
0
132
Member Avatar for jeswin12

Check out some of the scripts at [url]http://www.walterzorn.com/index.htm[/url]. Walter Zorn has one that covers Drag & Drop.

Member Avatar for Troy
0
99
Member Avatar for TraderX

I have not looked at that script, but you are saying that you can run rss2html.php and get the output that you want, but you want that output inside your own index page instead? You mention that your home page is already named index.php, so it's already a PHP script …

Member Avatar for Troy
0
140
Member Avatar for zippee

If you want an app to allow complete page creation and site design from scratch, there are lots of great apps available. One of my favorites is WebEdit Pro from [url]www.interspire.com[/url]. It's relatively pricey, but very robust and professional. If instead, you have templates or simple sites that you create …

Member Avatar for Troy
0
199
Member Avatar for paradox814

Just use the auto number anyway. It doesn't matter if you delete thousands of records. Gaps in the number sequence are not a problem. It's still a unique id.

Member Avatar for Troy
0
212
Member Avatar for meggsie

I assume your only question is how to build your javascript line that defines the array, but instead of hard-coding the array items, you want them populated from a SQL query? If this is the case, then this is a server-side question. And that depends on the language you are …

Member Avatar for tgreer
0
449
Member Avatar for symoore22

I'm not sure of your current skill level, so I'm making some assumptions based on what you said. Assuming that you know how to craft a SQL query to select data about a specific product (a specific product ID), and assuming you know how to use PHP to execute that …

Member Avatar for Troy
0
250

The End.