Jump to content

wildteen88

Staff Alumni
  • Posts

    10,480
  • Joined

  • Last visited

    Never

Everything posted by wildteen88

  1. You cannot do this with PHP. You will need to use a client side language for this, which would be javascript. You will have to echo out the javascript that will popup the new window in place of your header redirection code.
  2. if error_reporting is already set to E_ALL in the php.ini no need to reset the error_reporting back to E_ALL in your script. Also E_ALL includes all error messages except E_STRICT so instead of setting error_reporting to this: error_reporting = E_ALL & E_NOTICE & E_STRICT Set it like this: error_reporting = E_ALL & E_STRICT Save the php.ini and restart the server. Confirm the changes have been made by running the phpinfo() function and checking the settings under the PHP Core heading. Also make sure PHP is using the php.ini you are editing too by looking at the line that starts with Configuration File (php.ini) Path. It should show the full path to the php.ini it is currently using. If its set to just C:/WINDOWS then PHP cannot find the php.ini and is using the default settings.
  3. OK run this code in a seperate PHP file: <?php if(function_exists('mysql_connect')) { echo 'MySQL library is loaded'; } else { echo 'MySQL library is not loaded'; } ?> Post the out come when you run that file.
  4. Hello sushant_d84 and welocome to phpfreaks.com Please do not use txt speak within post. Post full words. Now to sort out this error: Call to undefined functon mysql_connect even though thre are all files exist. Please read [url=http://www.phpfreaks.com/forums/index.php/topic,95378.0.html]this[/url] thread.
  5. What version of php is WAMP1.6.1 using? Also how are you including your files?
  6. When you install MySQL it sets up an admin account automatically, the username is root with no password set. I dont bother with phpMyAdmins setup script. I copy the default config file (config.default.php) from the library folder (./phpMyAdmin/libraries/) to the root folder of phpMyAdmin (./phpMyAdmin) and then rename it to config.inc.php. To configure phpMyAdmin you just edit this file. It is fully documented to help you configure phpMyAdmin.
  7. If you have added PHP to the PATH then you dont need to move any files. Keep all files that came with PHP in PHP's installation folder. If you move files all over the place it causes complications. It is best to keep all files in one central place. When you added PHP to the path you will need to restart Windows in order for the changes to the PATH variable to come into effect. Now the problem you are having with the error is not to do with MySQL in any shape or form, but PHP's configuration. Due to changes from PHP4 to PHP5, PHP no longer comes with MySQL support enabled by default. Instead you have to enable the MySQL extension in the php.ini. I have setup a thread which tells you how to enable this extension, which is here. Also when ever you move or make any changes to configuration files related to the server (httpd.conf or php.ini) you must restart the server (Apache).
  8. Just echo the html out, example: if($something == true) { echo '<script type="text/javascript"> alert("Not true"); </script>'; }
  9. You will need to show more code in order for us to see how your class works. Preferably post the whole class here. Make sure you use the code tags ( ) when you post the code for the class.
  10. PHP cannot make a popup. You will need to make the client do that (the web browser). In order to do that you will need to output the relevant html/javascript to make a popup window Dang! Orio beat me
  11. OK. How are calling these function in the class? In order to call a method (function) that is in the same class you do this: $this->myFunctionName(); So to call the setTile function you do this: $this->setTile('my tile'); $this-> is is used to access methods and objects (variables) that in the same class.
  12. post the full error message(s) you are getting here. Also provide more code too. When you use session_start make sure you are not outputting anything to the browser.
  13. Works fine for me: <?php class tileCls { var $tile; function setTile($symbol) { $this->tile = $symbol; } function getTile() { return $this->tile; } } $tile = new tileCls; $tile->setTile('my tile'); echo $tile->getTile(); // returns: 'my tile' ?> How are you initiating the class?
  14. Is the first code snippet all part of one file? If it is then your code wont work as are calling a function session_start after output has been made to the browser. You cannot use session_start after output has been made. it must be called before any output is made. Try this code: <?php //if "email" is filled out, send email if (isset($_POST['email'])) { include("config.php"); $con = mysql_connect($database_host,$database_username,$database_password) or die('Could not connect: ' . mysql_error()); mysql_select_db("jb", $con); //send email $email = $_POST['email']; $subject = $_POST['subject']; $message = $_POST['message']; $sql = "INSERT INTO JohnBlairDesign2 (Name, Email, Definition) VALUES ('$subject','$email','$message')"; $result = mysql_query($sql, $con) or die('Error: ' . mysql_error()); echo "1 record added"; mysql_close($con); mail( "[email protected]", "Subject: $subject", $message, "From: $email" ); echo ' Thank you, ' . $subject . '.<br /> I will get back to you as soon as possible.'; } else { echo "<form action='index.php' method='post'> <div align='left'>Name:</div><input type='text' name='subject' /><br /> <div align='left'>Email:</div><input type='text' name='email' /><br /> <div align='left'>Definition of Site:</div><textarea name='message'></textarea><br /><br /> <input type='submit' /></td> </form>"; } ?>
  15. Looking at the two pieces of code you have posted they dont even relate. The first code snippet has a form which sends an email. The other connects to a database and gets the data stored in a table called JohnBlairDesign2 in the jb database. I'm not sure what you are asking here.
  16. Its not violent no - no ones comes to your home demanding your password. It is a method which is used to go through a large number of known possibilities to creak a password/pass-phrase. You can readup on brute force attacks and dictionary attacks over at wikipedia.com for more information.
  17. md5 encryption can be decrypted however it is not easy to do - there is no set code/function available. You have to use brute force attacks in order to decrypt it - some hackers use so called dictionary attacks which basically means the hacker runs a programme that goes through every word in the dictionary to hack the encrypted password. To hack md5 encryption it requires lots of computing power.
  18. Not really sure on that one. You'll have to ask kucing that. I think kucing copied that from his BBCode parser. Its probably a way kucing uses to stop people "over-typing" exclamation marks (thanks mb891 for correcting me).
  19. You can still register I believe even if the forum is "turned off". This is not SQL injection. If its SQL injection then they will do far more serious things, such as delete the forums database or all databases, than register an account for your forum. I would take this up with the developers of Invision Power Board if where you. Go to http://forums.invisionpower.com/ for support on this. Also I am going to move this to the Third Party support forum too due to this being a support request for IPB
  20. Yeah when defining widths as percentages the percent sign goes after the number not before as Tyche says. Also there is no need to define every cells width on each row. Just define the widths for the cells on the first row only. SO this is should be your code now: echo '<tr>'; echo '<th width="15%"> RANK </th>'; echo '<th width="15%"> RESOURCES </th>'; echo '<th width="55%"> USER NAME </th>'; echo '<th width="15%"> POINTS </th>'; echo '</tr>'; while ($Att_rows = mysqli_fetch_array($curr_page_query)) { echo '<tr>'; echo '<td>' . $Att_rows['Rank'] . '</td>'; echo '<td>' . $Att_rows['Resource_1'] . '</td>'; echo '<td>' . $Att_rows['User_Name'] . '</td>'; echo '<td>' . $Att_rows['Points'] . '</td>'; echo '</tr>'; }
  21. Huh? what do you mean page extensions? I was not talking about page extensions. I where talking about the various add-ons (extensions - mini apps you can install to customise the way you use your web browser) available to firefox that all.
  22. You just upload the desired template you wish to use and edit the contents of the html files it comes with. You're best of learning HTML first though.
  23. Didn't see the where clause in the query there Orio. I thought it was just a normal Select all from table. I quickly read the post properly.
  24. This can only be done if safe_mode is off and allow_url_fopen wrappers is enabled in the php.ini If you use php5.2 or greater make sure allow_url_include is enabled instead of allow_url_fopen.
  25. Now loop through the result set with a while loop: while($row = mysql_fetch_assoc($check)) { echo $row['name'] . ' - ' . $row['address'] . ' - ' . $row['tracking'] . "<br />"; }
×
×
  • 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.