Jump to content

Nudd

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Everything posted by Nudd

  1. I already have a functioning rewrite system that when someone requests one directorydirectory under the root, it rewrites (in the background) the urls to point to a different location where all of the fully functional scripts are: ie: User goes to http://www.example.com/directory1/post.php and sees that in the URI string in their browser The script that is invoked is actually http://www.example.com/admindirectory/post.php User goes to http://www.example.com/directory2/get.php and sees that in the URI string in their browser The script that is invoked is actually http://www.example.com/admindirectory/get.php (Again, let's imagine this already works) What I want to do is have domains on this account that 'silently' point to the selected directory and invoke the same sets of above rewrites. ie: User goes to http://www.newexample.com/post.php and sees that in the URI string in their browser The URI in the background is actually http://www.example.com/directory1/post.php The script that is invoked is actually http://www.example.com/admindirectory/post.php User goes to http://www.secondexample.com/get.php and sees that in the URI string in their browser The URI in the background is actually http://www.example.com/directory2/get.php The script that is invoked is actually http://www.example.com/admindirectory/get.php Again, the directories rewrite properly on their own - how would I go about passing off rewrites from the document root to these functioning directories, maintaining the file and query strings so that the directory specific .htaccess files can interpret them correctly? Thanks in advance for any help.
  2. Use the html character code: € or € That should do it.
  3. That's correct, they'll only see the final output, so long as the server is set up properly to execute PHP scripts.
  4. Your while loop is already there, and that's where some or all of the action can take place. Either you can echo each individual item, or you can store them in an array for later echoing. The way it's looking now echoing immediately is probably the simplest approach. Just put an echo statement containing those variables inside the while loop you already created, and format them as you see fit ie: echo "<tr><td>Message ID: ". $id ." </td><td>". $post_head . "<br>". $post_body . "</td></tr>"; or something crazy like that.
  5. Did you fix your assignments to be comparisons? if ($row['field_type'] = 'Text') Will always be true because you're assigning the value, and not making a comparison. This line should read if ($row['field_type'] == 'Text') As should all of the elseifs. == is a proper comparison = is an assignment
  6. Don't most (cheap) hosts just use the same server (or at least ip address) as their web server? You could just ping that. Alternatively, ping the smtp server that's provided by your host, chances are it's one of those.
  7. Seeing as this post didn't directly mention AJAX, my response may be irrelevant... Do you mean that you want that profile data to still be visible on the screen after posting? Or you just want to search on usernames? Regardless of the answer to either of those, a pre-requisite of anything useful happening in a mysql table is an auto incrementing id field in your profiles table - and any other table (generally also set as your primary key). Once you have that, you can do just about anything you like. If you want to retrieve the data after insertion, use the command... mysql_insert_id() ...In a select statement to retrieve that new record. (ie: "select * from profiles where id= '" . mysql_insert_id() ."'") If you just want to find users that match a certain username in a profile search, you can use a simple select statement like "select * from profiles where username = '" . $username_search . "' order by username"
  8. It is usually tied to that value, but I expect if there's an error it will fall back on the default. Does your server provider allow other smtp servers to be run through the default port? I know many ISPs in this area block access to any other SMTP server on port 25, but any other port is nifty with them. Have you tried a different port using: ini_set("smtp_port","26"); //Or some other port number
  9. I'm not surprised that Notepad++ is the top contender, it's my favourite editor when strictly dealing with PHP. I am surprised that there's no mention of the Expression Web product line, though I guess thoughts of FrontPage might scare people away. I use it at work, and it's a tremendous departure from the dangerous Frontpage culture. I'd say it's a great competitor to Dreamweaver, so long as you stick to either version 2 or 4. PHP even has some decent integration when compared to other more vanilla editors (after version 1) I will have to check out this NetBeans phenomenon, seems to have quite a lot of supporters for a product developed in Java.
  10. Being a fairly recent convert to libertarianism, I find most forms of government do-gooding is thinly veiled interference that's almost always preceded by a fairly loud public outcry from folks demanding protection from random boogeymen. I'm still shocked that this is even an issue... every operating system and environment I've ever used since the mid 80's has come bundled with some additional software that had third party alternatives. How come governments didn't skewer Microsoft in the early 90's for bundling DOS Shell with their money maker of the day, or suckerpunch Apple for bundling all those lovely proprietary apps in their early Macintoshes. I'm definitely in agreement about the package listing feature for Windows though, I'm surprised they haven't stol...er... introduced one yet. How did I (and countless others) return to legitimate PC gaming? The rise of Steam, which makes it absurdly simple to buy and install games. We should have this for our Windows programs. Microsoft has the connections, were it not for their inherent fear of competing, they'd be the ideal candidates to create this service.
  11. I'd say yes... speed and stability will both be affected if you're updating literally hundreds of rows in a single click unless they're all somehow updated with a very limited number of SQL statements without looping in PHP. I've crashed an XAMPP mysql server by running 250 queries in a single click during my earlier days, and necessity being the mother of invention, I was able to bring that down to a still high average of 16. I'm pretty sure that it's the number and complexity of queries that determines how fast and stable things will be, so if you're accomplishing these updates with a small number of non-looped queries then you'll likely be okay. Otherwise you'll want to rethink.
  12. You must have error reporting turned off, theoretically you should have received an error for changing the header after an echo. The sleep command is brand new to me, and I'm not even sure I get the point of it in PHP... but I did find out how to invoke it in your crazy scenario - just send the browser a bunch of extra whitespace. Add a few lines of this before or after your echo statement: echo " "; I'm not sure if your header redirect will even work with any echoed text present, but if that much of your code was already working for you, then adding the whitespace should solve the rest. Personally I prefer inserting javascript redirect code, but I guess the server side sleep function might be a more universal solution for people with javascript disabled.
  13. Were you intending to 'assign' values to $row['field_type'] in your if statements? What's basically happening is you're making the first condition true, and the rest false, simply because you're assigning instead of comparing. = bad == good Unless it was somehow intentional, it's been a long day for me.
  14. I've been aware of this uber popular site for some time, but have used it more as a passive resource. I joined today after reading some slightly heated thread about how sites like this are as important to be involved in as getting a Zend certification. Regardless I'm an experienced and relatively well established PHP developer, so perhaps some day I'll help answer a newbie's question on this valuable site - or maybe get a question or two answered when I choke on regular expressions or some highly inefficient mysql queries. So, pleased to be here, cookies for all, unless you're blocking them.
×
×
  • 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.