Jump to content

squiggerz

Members
  • Posts

    59
  • Joined

  • Last visited

    Never

Everything posted by squiggerz

  1. Yeah, I was trying to bold that part, but apparently you can't do that within the[]code tags or something. No worries.
  2. Simple 'if' statement: if(@form_vars($_POST['action']) <> 'something' What does that <> operator mean? Is that literally less than or greater than?
  3. Try adding one more \ to the beginning. \\\vpvault\Backup\Miller\ I think the code is looking at your first \ as an escape character, so it's not displayed, now why it wouldnt show the other 2 as escapes, I dunno. But try that and see if it works.
  4. I'm pretty sure you can't pass an input tag's value to the next page without a form action, which would need an action from a user.. I hope someone proves me wrong though, that'd save me a lot of session hassle as well.
  5. You could just set them as session variables like $_SESSION['test'] = "blahblah"; Then just make sure you do a session_start(); at the beginning of each script. EDIT: blah, ninja'd
  6. Well it's not really going to be geared towards mainstream cms type usage, it's for a local advertising/directory network, it will maintain customer ads/banners as well as phone numbers and addresses on about 12 different sites. Think of a CMS that manages the data for http://www.yellowpages.com But anyway, the 3 database situation is meant to ensure that anytime someone accesses one of the 12 sites that the database is linked to, they will be able to access the information they are looking for. I know being able to ensure 100% availability is almost completely impossible, but I'm trying to cover as many bases as possible. The information in the database is minimal, mostly containing paths and small amounts of code for each individual ad/banner/info, so the 3 database set up seemed feasible from that standpoint. Even just a second database would probably work, the 3 database idea was sent down from above me, so I really don't have a whole lot of pull to change that unless I can find a much better idea. I hope this at least kind of explains what I'm trying to do, happy to hear any ideas you might have, it means a lot
  7. So I'm building my own CMS, mainly PHP, some js/ajax and all backed by a mySQL db. I want to have 3 separate databases that will be added to, deleted from, updated all concurrently, so to put it better, I'll have three identical databases all the time. The idea is if one goes down, one of the other two will pick up the slack.. somehow. I have two questions, and I don't necessarily need a definite answer, just a push in the right direction. I'm not sure if I'm just using the wrong search engine terminology or what, but I've done quite a bit of research and I can't seem to get on the right track. Anyway: 1. Is there any way I can set up these three databases to work the way I want to? That is to say if someone accesses a page that gets data from the db, that if the first db on one server is unavailable, it would be able to pull from another in a fluid fashion? 2. If I have these three dbs, and I make changes to them all simultaneously, is there any sort of verification that I can set up that will make sure all of them get changed so the data stays concurrent? Like I said, even a gentle shove in the right direction would be appreciated, I don't care to read and learn like everybody else, but I'm spinning my wheels here.. Thanks, Sq
  8. maybe (COMPOSITE)+(.*?)([ ])+(.*?)([ ])+(.*?) match [5] being the second set? Are you just trying to get to the "AGRI" word?
  9. Ok, let's say I preg_replace the a name="blah blah blah"> tag with nothing. Now I'm left with a whole bunch of '/a>' tags, can I use some sort of preg replace or something that checks only for ending 'a' tags that are NOT preceeded by opening a tags before hitting a preceeding '/a' tag? Maybe something like: ((??<!(?:<a (.*?)>)).)*) Yeah I know, I'm terrible with regex.. lol
  10. Have you taken the little '@' off of the include_once to see if you have any warning messages?
  11. I sort of asked this in the regex section but this may require a more general answer, I'm not sure. Here's what I got: <a name="blah blah blah"> <b> Blah blah blah </b> </a> I added the spaces in between the tags for readability, they are either there or not in the code I'm trying to mutate. What I'm trying to do is get rid of the opening and closing 'a' tags, is there an easy way to do this and make sure that only THAT set of 'a' tags get removed and leave the rest alone? Thanks, Sq
  12. Ok... I kinda came up with the same thing but I have another question... ((??!<(?:b|font|/li)).)*) Can I use that type of set up to remove a set of tags in some code but not the stuff between those tags? You see, I have these <a name="blah blah"><b><u>Stuff here</u></b></a> blocks of code... I'd like to remove just the <a name="blah blah"> and </a> tags, without affecting other 'a' type tags, like <a href tags.. Also can someone point me in the direction to where I can learn more about the assertions like ?: ?! and ?=, php.net doesnt seem to explain it in easy enough language for me to grasp. Thanks, Sq
  13. Post us some code.. always helps.
  14. <?php if (!isset($_POST['Fetch'])){ ?> <html> <head> <title>File Fetcher</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <table border="1"> <tr> <td colspan="2"><center><b>File Fetcher</b></center></td> </tr> <tr> <form method="post" action="<?php echo $PHP_SELF;?>"> <td><input name="fpath" type="text" size="60"></td> <td><input name="Fetch" type="submit" value="Fetch File"></td> </form> </tr> </table> </body> </html> <?php } else { $fpath = $_POST["fpath"]; echo '<a href="'.$fpath.'"><input type="button" name="Fetch" value="Fetch File"></a>'; } ?> That worked for me.. aside from the link I put in.. because it wasnt really a link lol.. but it echoed in the right spot and make the button clickable.. you didnt just copy & paste what I wrote out earlier did you?
  15. Have you tried just making an input button and wrapping that in a link? Like <a href="<?php echo $path; ?>"><input type="button" name="Fetch" value="Fetch File"></a> I know it's a crude solution, but if you have dreamweaver you can use it to create a flash button then just insert your path there. Hope that helps a little. Sq
  16. Ok, I've been at this for the better part of 8 hours now, no sign of luck yet, somebody please help if you can and are willing: <li><a href="../blah/bleh/96400_96549_bluh.htm">Bluh Administration</a></li> <li>Oh man, bah bah <b><font color="#FF0000">38999</font></b> <a href="../urv/urv302/urv_38000-38999.htm#38700"><font color="#00FF00">(+)</font></a></li> </ul> Alright, as you can see, I'm trying to extract data from unordered lists. These lists are many and spread out across a thousand different files (yes literally). What I'm trying to get into a subpattern is the last list item: the <li>Oh man, bah bah..... one. Now, my current regex wont grab the data right because I'm trying to get everything between the <li and <b (if it's there, if not, use the <font color tag). Here's my regex: @(<li>)+(.*?)(<b>)*(<font color="#FF0000">)+@ism The only problem is, in the second subpattern (.*?) it finds everything after the first <li> in the string, which includes half of that paragraph from the first code I pasted above, up until the first <b or <font color tag it comes to. Is there any way I can still use the <li tag that is relevant to the list item I want or is there some other way to get that data? I hope the regex I have there kind of explains what I'm trying to do. Ultimately, what I want in that (.*?) area would be: Oh man, bah bah Any and all help would be GREATLY appreciated. Any questions will be promptly answered as I'm sitting on this forum for even a glimmer of hope, 8 hours straight and I still cant get it right. Thanks, Sq
  17. Ok, I've narrowed it down a bit more. Apparently I can get this php connect script to function correctly on several different servers. The only one I'm having trouble getting it to work correctly on is a Verio VPS account. What I'm saying is: Verio VPS account has the php script to execute. Server A is a Hostgator account, which is where the database is located. Every other server I try can use this script to access that database. Except for the Verio one.
  18. Update: Server B is not the only server that the script works on. I've tested the same script on at least 5 other servers across the interwebs... So either Server A is blocking traffic from Server C ? or Server C has a configuration problem somewhere in php?
  19. Ok, I have a db on Server A. Server B is on the same network, different IP. Server B connects to the db correctly through my php script. Server C is on a totally different network. Using the same script as was used on Server B, I'm unable to connect to Server A's database. Access hosts on Server A has been configured as % to allow connections from anywhere. I can connect to the db from my local computer using SQLyog just fine. Both Server B & C are running php 4.4 Any ideas as to why the script will not connect on Server C?
  20. OK, I found this javascript code (below) that takes a "Check All" button and checks every checkbox in a group. My problem is where it does the onClick="checkAll(document.myform.list) <-- my 'list' is set up with input names like this 'list[]' because it posts the values checked into an array that I later combine to form a string. but the [] seems to prevent the javascript from working as when I drop the [] from my checkboxes, the javascript works (my post doesnt of course). I'm a complete moron when it comes to javascript and I know this is a php forum, but I'm just hoping somebody here has dealt with this in the past and knows the easy way around. <SCRIPT LANGUAGE="JavaScript"> // <input type=button name="CheckAll" value="Check All" onClick="checkAll(document.myform.list)"> // <input type=button name="UnCheckAll" value="Uncheck All" onClick="uncheckAll(document.myform.list)"> function checkAll(field) { for (i = 0; i < field.length; i++) field[i].checked = true ; } function uncheckAll(field) { for (i = 0; i < field.length; i++) field[i].checked = false ; } </script>
  21. Looks like you might need to configure access hosts on your server, dont suppose your server uses Cpanel software does it? Wait, if you uploaded the php file to the same server as the server your database is located, disregard this.
  22. Woot, I just popped my 'support cherry' Glad to finally give a little back to this forum lol
  23. last line $ImageAuctionDate."/","images/".$imageAuctionDate."/thumbs/",100); shouldnt that second variable be capitalized? like the first one.
  24. It's worked for me in the past somehow, guess it was a quote/doublequote problem or something tho.... would really help to see the rest of the code really..
×
×
  • 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.