Jump to content

scheols

Members
  • Posts

    113
  • Joined

  • Last visited

    Never

Everything posted by scheols

  1. I tried this query: <?php include("config.php"); $load_data = mysql_query("LOAD DATA INFILE 'sql.txt' INTO TABLE `loadata`;") or die(mysql_error()); ?> sql.txt INSERT INTO `loadata` (`text`) VALUES('example'); INSERT INTO `loadata` (`text`) VALUES('example'); INSERT INTO `loadata` (`text`) VALUES('example'); INSERT INTO `loadata` (`text`) VALUES('example'); INSERT INTO `loadata` (`text`) VALUES('example'); INSERT INTO `loadata` (`text`) VALUES('example'); INSERT INTO `loadata` (`text`) VALUES('example'); INSERT INTO `loadata` (`text`) VALUES('example'); I get access denied: Access denied for user 'scheols_HIDDEN'@'localhost' (using password: YES) My host said they don't restrict it so does anyone know whats up?
  2. Can't seem to find any on google only for HTML 4.0
  3. [code]Yep that is the best way I made one of these about an 2 hours ago. function/inputsettings.php [code] <?php function inputsettings($value,$type,$name){ return '<input type="'.$type.'" value="'.$value.'" name="'.$name.'">'; } ?> [/code] [/code] [code] <?php include("./config.php"); require_once("./functions/inputsettings.php"); if($logged[username] != 5){ echo "Sorry you do not have permissions to view this area"; exit; } $subject = $_POST['subject']; $message = $_POST['message']; $sendmasse = $_POST['massemail']; $uone = mysql_query("SELECT * FROM users WHERE id='1' ") or die(mysql_error()); $adminone = mysql_fetch_array($uone); $admin = $adminone[email]; $adminname = $adminone[username]; if(isset($sendmasse)){ $user_emails = mysql_query("SELECT * FROM users") or die(mysql_error()); while($alluseremails = mysql_fetch_array($user_emails)){ $allusers = $alluseremails[email]; mail($allusers,$subject,$message,"From: "."Webmaster - $adminname"."<".$admin.">\n"); } }else{ ?> <form method='post'> <table border='1' width='100%'> <tr> <td style='text-align: center;'> Send email </td> </tr> </table> <table border='1' width='100%' colspan='2'> <tr> <td> <center>Subject</center> </td> <td> <center><input type='text' name='subject' size='27'></center> </td> </tr> <tr> <td> <center>Message</center> </td> <td> <center><textarea name='message'></textarea></center> </td> </tr> </table> <?php echo "<center>".inputsettings('submit','submit','massemail')."</center>"; ?> </form> <?php } ?> [/code]
  4. when i said "say you have another directory to go up" i ment 3 directories folder>folder2>folder3
  5. so kenrbnsn say you have another directory to go up would i have 3 dots? or just another ../ like this ./../.../ or ./../../
  6. is it possible to get parent directory instead of child directory?(im looking now so dont get mad :()
  7. why you just spam? Im just asking a question. So how does the little dots work between the slashes.
  8. Ok how do you know what directory yuor in? $nevux_root_path = "./../"; I use that if im in a subdirectory how does sub directories work?
  9. close it i dont care no more im out im tired of these type of people.
  10. [quote author=ignace link=topic=103195.msg410809#msg410809 date=1154889446] hearing of it is not enough, its using it that defines you... look, i'm not trying to insult you or anything, but "where can you learn mysqli?" on php.net or read a book, want help with something involving mysqli (a function not working, strange error's, etc...), that's what we are here for, we're not gonna play your teacher.. @scheols if you know mysql, you will be easily picking up with mysqli, because the changes aren't that big... you still connect with your database through mysqli_connect(); the only difference is that mysql_select_db() is left out and an i has been added to the connect function! You also have the ability to directly put your database name in your connect function [/quote]its more then just mysqli_connect kid now if you dont want 2 help fine with me leave this thread as i said i know mysql i want to know more about mysqli do u understand? its a help forum, now im looking forsomeone who can tell me where i can learn this mysqli functions etc..  please stop posting.
  11. thanks benjamin for your support im learning all this so i can open up my PHP site soon and mysqli is just a weekpoint of my coding abilities. Anybody got a quick referrence couldnt find anything on google.
  12. Looking for more of a manual not a tutorial can i ask a question mysqli is way different then regular MySQL and yes i heard of google mysql [code=php:0] <? $uname ="Uname";//Username $upass ="upass";//Userpassword $database="dbname";//Database name mysql_connect("localhost",$uname,$upass); mysql_select_db($database) or die(mysql_error()); ?> [/code] mysqli [code=php:0] <?php /* Connect to a MySQL server */ $link = mysqli_connect(             'localhost',  /* The host to connect to */             'user',      /* The user to connect as */             'password',  /* The password to use */             'world');    /* The default database to query */ if (!$link) {   printf("Can't connect to MySQL Server. Errorcode: %s\n", mysqli_connect_error());   exit; } ?> [/code]
  13. here try looking at this. find the php code and try and learn from it and you should be okay mate. else if you cant try search php on pixel2life.com and search the member system options no the left side of the screen. [attachment deleted by admin]
  14. please point me in some directions thank you.
  15. scheols

    Resolution

    alright im still working on Nevux Ability Boards but in other resolutions besides 800x600 it looks like trash but 800x600 looks perfect how can i get it like a IPB so its stretches with the resolutions http://nevuxv15.xizionz.vectoredhost.com/index.php i took registration off so dont try and join. im close 2 being finished
  16. alright see i have this script that edits post but problem is when i try and edit others besides the second post it doesnt edit it only grabs the first post so how can i get each post in each topic by thier post id? addpost.php script part(just the php script for edit) [quote][code=php:0] <?php if($logged[level] != 5 && $logged[level] != 3 && $logged[level] != 4){ echo ""; } else { echo "<a href='fpedit.php?id=$s'>Edit</a>"; } if($logged[level] ==1 && $logged[username] == $t[username]){ echo "<a href='fpedit.php?id=$s'>Edit</a>"; } ?> [/code] [/quote] edit script[quote] [code=php:0] <?php include "config.php"; $zid = $_GET['id']; $submit = $_POST['esubmit']; $p_zid = $_POST['zid']; if($submit){ if($logged[username] ==null){ echo "You not allowed to edit"; exit; } $ename = $_POST['ename']; $epost = $_POST['epost']; mysql_query("UPDATE `replies` SET `post` = '$epost', `username` = '$ename' WHERE `tid` = '$p_zid' "); echo "Thank You Your News Has Been Edited SuccessfullyYou Will Now Be Redirected <meta http-equiv=Refresh content=4;url=index.php>"; } elseif(!isset($submit)){ $result = mysql_query("SELECT * FROM replies WHERE id='$zid' ORDER BY id ASC"); while($row = mysql_fetch_array($result)){ $name = $row['username']; $post = $row['post']; ?> <h2>::Edit Posts::</h2> <form method="post" action="<?php echo $PHP_SELF ?>"> <input type="hidden" name="zid" value="<? echo $zid; ?>"> Name: <input type="text" name="ename" maxlength="20" value="<? echo $name; ?>"><br> Post:<textarea name="epost"><? echo $post; ?></textarea> <input type="submit" name="esubmit" value="Update Post"> </form> <? } } ?> [/code] [/quote] well i think the idea is get each id of the post so select from replies is wrong im thinking.
  17. any ideas how i can do it every time i push return like this ^that would be 2 <br><br>
  18. make sure your forum has <form method="post"> </form>
  19. man i dont feel like doing that im trying 2 do BB codes [code][code=php:0][/code][/code] so yeah im trying to add it so users can do this.
  20. alright i have a script 2 addtopic's and everytime i add a topic it updates the forum topics so after it updates the mysql_num_rows guess it messes up and doesnt show until another post is made. [quote] [code=php:0] <?php $s = $_GET['id']; $name = $logged[username]; $title = htmlspecialchars($_POST['title']); $post = htmlspecialchars($_POST['post']); $spost = $_POST['spost']; if(isset($spost)){ $s1 = mysql_query("SELECT * FROM topics WHERE fid='$s'"); $count = mysql_num_rows($s1); mysql_query("UPDATE forums SET topics='$count' WHERE id='$s' "); mysql_query("INSERT INTO topics(fid,title,post,username) VALUES('$s','$title','$post','$name')") or die(mysql_error()); echo "Post Created Successfully"; }elseif(!isset($spost)){ ?> <table colspan=2 bgColor="#FFFFFF"> <tr> <td><form  method="post"></td> </tr> <tr> <td>User Name</td> <td><? echo $logged[username]; ?></td> </tr> <tr> <td>Topic Title</td> <td><input type="text" name="title"></td> </tr> <tr> <td>Post:<td> <td><textarea width="200" height="200" name="post"></textarea></td> </tr> <tr> <td><input type="submit" name="spost"></td> <td></form></td> </tr> </table> <? } ?> [/code] [/quote] and i do this on index where i grab the info [quote] [code=php:0] <?php $nc9 = mysql_query("SELECT * FROM topics") or die(mysql_error()); $f2 = mysql_fetch_array($nc9); $nc2 = mysql_query("SELECT * FROM forums") or die(mysql_error()); while($f = mysql_fetch_array($nc2)){ if($f[cid] ==$c[id]){ $replies = $f[replies]; $topics = $f[topics]; ?> <table colspan=4 bgColor="#E4EAF2" width="90%" style=" border:1px solid #000;border-top:0px solid #000"> <tr> <td width="50%"><a href="viewforum.php?fid=<? echo $f[id]; ?>"><? echo $f[title]; ?></a></td> <td width="20%"><? echo $f[lastpost]; ?></td> <td width="10%"><? echo $topics; ?></td> <td width="10%"><? echo $replies; ?></td> </tr> </table> <? }}} ?> [/code] [/quote] so im wondering why does the topics row in forums table doesnt stay updated?
  21. meh i wont do non of them -_- str_ireplace() works nicely [quote][code=php:0] <? $s1 = array("http://invisionfree","invisonfree","invisionfree.com","http://invisionfree.com/","the","quick","brown", "fox", "jumped", "over", "the","lazy","dog"); $t[post] = str_ireplace($s1, "*BLEEP*", "$t[post]"); ?> [/code][/quote]
  22. how can i check an array thats case sensitive? like BDDDD bdddd BdDdD BDDdd bDbDD etc.. i want them to be able to check with a good wordfiller
  23. can someone show me the php highlihting so you can highlight php scripts preg_replace() with highlight_string()
  24. [quote][code=php:0] $s1 = mysql_query("SELECT * FROM topics WHERE fid='$s'"); $count = mysql_num_rows($s1); mysql_query("UPDATE forums SET topics='$count' WHERE id='$s' "); [/code][/quote] welll i have this code and im trying to update the topics on index page so when i add that to one of my pages it doesnt update the forums topics the way it should but when i add it to my add reply page it counts everytime and shows on index then i come back like a hour later and it doesnt update until the next time i count what should i do
  25. cool thanks i got my topics on index to rise thanks yalls :) [code=php:0] $s1 = mysql_query("SELECT * FROM topics WHERE fid='$s'"); $count = mysql_num_rows($s1); mysql_query("UPDATE forums SET topics='$count' WHERE id='$s' "); [/code]
×
×
  • 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.