Jump to content

kickassamd

Members
  • Posts

    102
  • Joined

  • Last visited

    Never

Everything posted by kickassamd

  1. Yep thanks thorpe fixed it
  2. Ill check...but i cant stand doing the long tags bothers the **** out of me.
  3. Here is the file itself... <? $wordList = array("sdfdds" => "fdssdfdsfds"); // Loop Through Words foreach ($wordList as $key => $value) { echo "Key: $key; Value: $value;<br />\n"; } ?>
  4. Basically i view the PHP file in IE and get this back "fdssdfdsfds"); // Loop Through Words foreach ($wordList as $key => $value) { echo "Key: $key; Value: $value; \n"; } ?> Its printing PHP code... Ive noticed that if i remove the => from foreach it doesnt print the foreach() portion... Also if i roll back to 5.2.0 and run the same file... It outputs correctly with out the code... Is this a bug in 5.2.1??
  5. I want to give PHP a series of username \ password combinations and have it "login for me" without me filling out the form with each one... I just want PHP to automate testing the username \ password...
  6. No no not that... I can send form variables to PHP... Im asking if PHP can send variables to a form and check if they are valid....
  7. Is it possible to have PHP send login \ password to a form processor to test if the login is valid?? Instead of me manually doing each one?? I know there are programs but this is a learning experience for me and also software isnt free
  8. Easiest thing to do is pass them in the URL to page 3 .. then use $_GET to pull the variables from the URL. You can also store the variables in $_SESSION and pass them on the the next page. From results page: <a href="http://www.yoursite.com/new_page.php?quote_num=$quote_num&total=$total" />New Page</a> New page: echo $_GET['quote_num']; echo $_GET['total']; Session Method:: From results page: session_start(); $_SESSION['quote_num'] = $quote_num; $_SESSION['total'] = $total; New Page: session_start(); echo $_SESSION['quote_num']; echo $_SESSION['total'];
  9. Correct but you are asking You said peters priv is 1 And no rows will get returned because you are asking for priv = 0 $query = "SELECT * FROM user_ids WHERE user='$user' AND priv=0"; therefore SELECT * FROM user_ids WHERE user='Peter' AND priv=0; And the $count = mysql_num_rows() will return 0; because peters priv is 1; And your if statement that says if ($count == 0) { echo "You have already created"; } Will print.
  10. If IIS has no default page set or there are no files in the directory that IIS can load as default page you will get this error. Also if you are reading index.php and PHP is setup on server properly, Make sure you have permissions correct on PHP folder and php parser create a file called index.php <? echo phpinfo(); ?> save to c:\inetpub\wwwroot unless you have a diffrent path defined.
  11. Is PHP being able to save to that DIR? Do you see files in c:\Program Files\tmp from PHP
  12. Try if(empty($username) || empty($password)){ header( 'Location: index.php' ) ; session_destroy(); }
  13. Ive always recommended OSCommerce to people doing e-commerce stuff. Works very well for what you are asking.
  14. Notice your query you are asking if privledge = 0 But you said Peter is = 1 therefore the count will be 0 and result in echoing the character is already created.
  15. Glad i could help
  16. <?php if(isset($_POST['submit'])) { $to = "lol@gmail.com"; $subject = "Contact"; $name_field = $_POST['name']; $email_field = $_POST['email']; $message = $_POST['message']; $body = "From: $name_field \r\n E-Mail: $email_field \r\n Message:\n $message \r\n"; echo "Data has been submitted to $to!"; mail($to, $subject, $body); } else { echo "blarg!"; } ?>
  17. Honestly you should store stuff within a database like MySQL as working with flat files is confusing and time consuming.
  18. Try this, should work, I dont have a way to test it ATM. Just replace your mail function with what i have provided below. $headers = 'From: '.$emailadd.' \r\n'; $headers .= 'Reply-To: '.$emailadd.' \r\n'; $headers .= 'X-Mailer: PHP v '.phpversion(). '\r\n'; mail($emailadd, $subject, $text, $headers);
  19. Which one in specific? Thanks effigy!
  20. Im seeing this more and more. Sites using the : instead of ? in URLs example http://www.collegehumor.com/video:1736333 How are sites doing this?? *Mods please move this if needed*
  21. Tried yours and i get an error [quote]SELECT a.group AS group, b.server AS server, c.service AS service FROM xoops_ss_groups AS a, xoops_ss_servers AS b, xoops_ss_services AS c WHERE a.gpID = b.ssID AND b.ssID = c.svBind Error number: 1064 Error message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group, b.server AS server, c.service AS service FROM xoops_ss_groups AS a' at line 2[/quote]
  22. [code]CREATE TABLE `ss_groups` ( `gpID` int(11) NOT NULL auto_increment, `gpName` varchar(50) NOT NULL, `gpDesc` text NOT NULL, primary key (`gpID`) )Type=MyISAM; CREATE TABLE `ss_servers` ( `ssID` int(11) NOT NULL auto_increment, `ssName` varchar(50) NOT NULL, `ssAddy` varchar(100) NOT NULL, `ssDesc` text NOT NULL, `ssGrp` int(11) NOT NULL, primary key (`ssID`) )Type=MyISAM; CREATE TABLE `ss_services` ( `svID` int(11) NOT NULL auto_increment, `svName` varchar(50) NOT NULL, `svPort` int(5) NOT NULL, `svDesc` text NOT NULL, `svBind` int(11) NOT NULL, primary key (`svID`) )Type=MyISAM;[/code] ssGrp is the group the server is binded to, and svBind is the server that the service is binded to, feel free to do whatever to my code to help it out ;)
  23. I have 3 tables that i need to pull data out off in 1 query "i hope" ss_servers, ss_groups, ss_services First I need to select all groups from db then select all servers that match each group then select each service that matches each server so that i can output it to HTML like this group 1     Server 1           Service 1 group 2     Server 2         Service 2 And hopefully it can still output like group 3     Server 3         Service 3     Server 4         Service 4         Service 4 Thanks!!
  24. That is what is strange... it does  ???
  25. [quote]SELECT f.*, c.id as cat_id, c.position as cat_position, c.state as cat_state, c.name as cat_name, c.description as cat_desc, c.image, c.url, m.member_name as mod_name, m.member_id as mod_id, m.is_group, m.group_id, m.group_name, m.mid FROM xoops_ipb_forums f, xoops_ipb_categories c LEFT JOIN xoops_ipb_moderators m ON (f.id=m.forum_id) WHERE c.id=f.category ORDER BY c.position, f.position;[/quote] And this is the error im getting.... Unknown column 'f.id' in 'on clause' What is wrong here?
×
×
  • 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.