Jump to content

saint959

Members
  • Posts

    87
  • Joined

  • Last visited

    Never

About saint959

  • Birthday 10/22/1984

Profile Information

  • Gender
    Male
  • Location
    South Africa - Pretoria

saint959's Achievements

Member

Member (2/5)

0

Reputation

  1. Hey all, Is there a way that i can get the date that a mysql table's structure was last changed? I know i can get the last updated time but that only shows me when a record was entered into the table. I need to find when last the Structure was changed? Any help would be hugely appreciated.
  2. What info is not being submitted? What section of the email are you not getting?
  3. Hi, In your mySQL query you left out the $ for location. So its searching the field where it is like "location" and not the variable "$location".
  4. Hi, Is this not supposed to be $message and not just message? <?php $email_body = "New message: Name = " . $name . ", Telephone No = " . $tel_no . ", Message = ". [b]$[/b]message; ?>
  5. Hi, They are mainly "functions" which pull data from the database and then display that data on a HTML or PHP page, depending on the type of data that is being pulled and what the next action from the client is going to be. Most of the files that are stored away from the clients domain are addon modules to the application. They are then included depending on if they have activated it or not in their system. So it is not actually data that is being included. Truth be told, the files will not be updated that often, it is only when we improve the Module with new features etc. So basically, we are trying to share functions, db connections. The data that gets updated is stored in a database, and never directly in the files that need to be included.
  6. Hi PFMaBiSmAd, Thanks for that, yip, that is exactly why i dont want to use .inc files. We have a system that spams over multiple domains and we use one of the domains to store all the "database/backend functions" stuff. For example, www.datastuff.co.za is the database stuff, while www.client1.co.za is the first client. They need to include files from the database domain which we then update on a weekly basis. thereby automatically updating all the clients systems in one go. We were using openbase_dir on our server but we are now in the need to get a second server, hence the need for url_fopen. If you could recommend any alternatives or things that i could look into i would really appreciate it. Thanks again for your time!
  7. Hi All, I am sitting with a problem that i am struggling to figure out. I am using url_fopen to include certain files into a system that we are writing but for some reason PHP is handling .inc files better than .php files. Below is an example: As a test I am including a .php file (database connection details) on another php file but it does not work. The file I am running is called: (URL)/index.php And the file I am trying to include is: (URL)/dbTest.php This then gives me an error. i.e. the connection details in the DpTest.php file does not "run", it does include it but the connection details are not evaluated. I have printed text from the file and it has displayed correctly on index.php. BUT when I change the filename of the dbTest.php file to dpTest.inc it does work. I am completely confused? any help would be hugely appreciated.
  8. Hi, no worries, i have managed to come right. I changed the stuff around and got it sorted.
  9. Thanks HuggieBear, I am sitting with the same problem though... If there are more than one within a textfield it gets confused. I read here that soemthing i should do is: <?php $text_new = eregi_replace('\[link=(www.[-a-zA-Z0-9@:%_\+.~#?&//=]+)\](.*?)\[/link\]', '<a href="http://\\1" target="_blank">\\2</a>', $text_new); ?> i.e. the ? after the (.* .... but this is giving me an error? have you got any idea for me? the error is: Warning: eregi_replace() [function.eregi-replace]: REG_BADRPT
  10. Ill definitely look into that thanks! Sometimes you just think complex when simple may be the best solution.
  11. Hey I had a look around and I also tried this: <?php function makelinks($text) { //for the "smart" links $text_new = eregi_replace('\[Link\](.*?)\[/Link\]([[:space:]()[{}])(www.[-a-zA-Z0-9@:%_\+.~#?&//=]+)', '<a href="http://\\3" target="_blank">\\1</a>', $text_new); $text_new = eregi_replace('\[Link\](.*?)\[/Link\]([[:space:]()[{}])(http://[-a-zA-Z0-9@:%_\+.~#?&//=]+)', '<a href="\\3" target="_blank">\\1</a>', $text_new); //for the standard links (works perfectly) $text_new = eregi_replace('([[:space:]()[{}])(www.[-a-zA-Z0-9@:%_\+.~#?&//=]+)', '\\1<a href="http://\\2">\\2</a>', $text_new); $text_new = eregi_replace('([[:space:]()[{}])(http://[-a-zA-Z0-9@:%_\+.~#?&//=]+)', '\\1<a href="\\2">\\2</a>', $text_new); } ?> But i then get this: Warning: eregi_replace() [function.eregi-replace]: REG_BADRPT
  12. Hi All, I really hope someone can help me, i have been struggling with this for a while now and i just cant seem to come right. I have a text field where a "client" can enter links the standard way i.e. www.url1.co.za which i then convert to a link when the text gets displayed. That is working perfectly. It makes the link: <a href="http://www.url1.co.za">www.url1.co.za</a> My problem comes in here: I also (trying to) allow them to enter "smarter" links i.e. [Link]This is the link text[/Link] www.url2.co.za This makes: <a href="www.url2.co.za">This is the link text</a> Now i have gotten the above to work when the [Link][/Link] tags have only been entered once with the text field, but the second they try and enter two the whole thing gets mixed up.... Here is the code i have so far: function makelinks($text) { //for the "smart" links $text_new = eregi_replace('\[Link\](.*)\[/Link\]([[:space:]()[{}])(www.[-a-zA-Z0-9@:%_\+.~#?&//=]+)', '<a href="http://\\3" target="_blank">\\1</a>', $text_new); $text_new = eregi_replace('\[Link\](.*)\[/Link\]([[:space:]()[{}])(http://[-a-zA-Z0-9@:%_\+.~#?&//=]+)', '<a href="\\3" target="_blank">\\1</a>', $text_new); //for the standard links (works perfectly) $text_new = eregi_replace('([[:space:]()[{}])(www.[-a-zA-Z0-9@:%_\+.~#?&//=]+)', '\\1<a href="http://\\2">\\2</a>', $text_new); $text_new = eregi_replace('([[:space:]()[{}])(http://[-a-zA-Z0-9@:%_\+.~#?&//=]+)', '\\1<a href="\\2">\\2</a>', $text_new); } If anyone could help that would really HELP ALOT
  13. Hi, you could try this if you know which record it is specifically that you wanted: <?php $rs_brass = mysql_query("SELECT * FROM the_brass ORDER BY `key` LIMIT 3,1"); $row_brass = mysql_fetch_array($rs_brass); echo $row_brass["image"] ?> that would then get the 3rd record Hope that helps / works
  14. Hi, you ca try this... $sql2="INSERT INTO pic SET size='".$_FILES['userfile']['size']."',town='$City',state='$State',image_type='$Type',name='".$_FILES['userfile']['name']."'"; I also just noticed that you changed the "file" from $_FILES['file'].... to $_FILES['userfile'].... I am not sure if i missed something but that may be it too
  15. try taking the $barwidth and dividing it by two to get the text in the center of the image. I.e. add: <?php // creating bar (int)$barWidth = $percent*$barX/100; $img = imagecreate($barX, $barY); $bgColor = ImageColorAllocate ($img, $bg_rgb[0], $bg_rgb[1], $bg_rgb[2]); $barColor = ImageColorAllocate ($img, $bar_rgb[0], $bar_rgb[1], $bar_rgb[2]); $textColor=imagecolorallocate($img, 255, 255, 255); $barCenter = $barWidth / 2; ImageFilledRectangle($img, 0, 0, $barWidth, $barY, $barColor); ImageString($img, 5, 1, 1, $text, $textColor); ?>
×
×
  • 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.