Jump to content

enil14someone

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by enil14someone

  1. does that mean i have to study on networking? at least it doesn't seem like i would need any complicated coding. thank you
  2. hello, uhm, im trying to make a log-in page that will connect to the areas wifi. i can make a log-in page using php and mysql but i was wondering how to make so that when the user "logs in" he/she will be connected to a certain areas wifi. for example, our school has a wifi hot spot in which, when you try to connect to it your'e sent to a log-in page to determine whether your'e a student (or facilitator). if you are, once you log - in your'e sent to google page and then you can use the schools wifi. if you aren't then you can't connect to it. so now my question is how to i make a log-in page that will allow a user to connect to wifi? do i have to contact the company (the one that manages web servers like pldt) for permission? are there any policies regarding this? can it be coded using php and others? if you can tell me then please do. thank you in advance
  3. Thanks for our advice guys uhm, regarding the "signing" part, my teacher said that since our course (Computer Engineering) doesn't have any licensure examination (meaning we aren't really an "eligible" engineer.) were not allowed to be on contracts so I don't know if that's applicable.
  4. err, dunno if i managed to put it in the right thread but if i didn't, please tell me. thank you. getting back on topic, my father asked me to create a website for a school. i know how to make a website but the problem is, how do i start? should i ask about their objectives or something? color of the webpage etc? in short, i don't know the practicalities and processes used in making a website for a certain client. you could say this would be my first time in doing this (kind of like an on-the-job training) so...any ideas? i would very much appreciate any help given.
  5. @psycho: erm...im don't get what you mean by escaping (sorry. im quite new to this o__o ). @jazzman1: not sure how to explain it....err the doesn't work when the some kind of 'symbol' in the data. for ex. in my html code, the the program reads the $item as 'C++' (data type is varchar in phpmyadmin ) but when it tries to get the information for the sales, $item turns to 'C' (the '++' are gone). in my code, mysql_query uses $item (which is c++ in the database but sadly became c in the code) to get its other information (such as its qty, price, etc...). since the word 'C++' turned to 'C' in my code (my database doesnt have an item named 'C' ), when I used mysql_query("SELECT * FROM items WHERE Item = '$item' "); mysql_query won't give anything since there is no such data (it would work if it was 'C++' but like I said, '+' gets omitted so its now 'C' D: ) and all my other variables will be undefined for some reason which i don't know. (sorry if i can't give the exact errors... im using a different computer. ill probably edit this later). I think what pyscho said might be the reason but i dont get what you meant by properly escaping them. Im really sorry @__@.
  6. sooo...im creating an inventory system (for my project) right now and one of its features is to determine the sales. problem is, '$item' seems to change in my code whenever the data has an operand or something (like the word 'c++'). It works if its just letters and numbers but it won't work whenever theres a "+" or any other operand. I think maybe its the way how i coded my html but maybe its also how I used $_REQUEST. i tried looking it again and again but i can't seem to see the problem. help pls. thank you! oh. btw here's: the one that displays the items (inventory): <?php echo "<h1 align = center >Ceejay Merchandising Inventory</h1>"; echo "<table border = '0' width = '80%' align = 'center'> <tr><td align = right><a text-decoration = none href = 'search.php' >[Search]</a></td></tr>"; echo "<table border = '1px' width = '80%' align = center > <tr align = center><th>Item</th><th>Qty</th><th>Barcode</th><th>Price</th></tr>"; mysql_connect("localhost", "root", "group8"); mysql_select_db("testsite"); $per_page = 10; $pages_query = mysql_query("SELECT COUNT('Item') FROM items"); $pages = ceil(mysql_result($pages_query, 0)/$per_page); $page = (isset($_REQUEST['page'])) ? (int)$_REQUEST['page'] : 1; $start = ($page - 1) * $per_page; $query = mysql_query("SELECT * FROM items ORDER BY Item LIMIT $start, $per_page "); echo "<br />"; while($row = mysql_fetch_assoc($query)){ $item = $row['Item']; $qty = $row['Qty']; $barcode = $row['Barcode']; $price = $row['Price']; echo "<tr><td width = '50%' > <a href = 'update_sales.php?item=$item&qty=$qty&bc=$barcode&price=$price'>$item</a></td> <td width = '5%' align = center>$qty</td> <td align = center>$barcode</td><td align = center>Php $price</td></tr>"; } echo "</table>"; $prev = $page - 1; $next = $page + 1; echo "<br /><center>"; if($prev != 0 ){ echo "<a href = 'items.php?page=$prev'>Prev</a>&nbsp"; } if($pages >= 1 ){ for($x = 1; $x <= $pages; $x++){ echo ($x == $page) ? "<b><a href = '?page=".$x."'>".$x."</a></b>&nbsp" : "<a href = '?page=".$x."'>".$x."</a>&nbsp" ; } } if($page < $pages){ echo "<a href = 'items.php?page=$next'>Next</a>&nbsp"; } echo "</center>"; mysql_close(); ?> gets information for sales: <html> <head> <title>Update Sales</title> </head> <body> <form method = "post" action = "update_sales01.php"> Item: <?php echo $_REQUEST['item']; ?><br /> Qty: <input type = "text" name = "qty"><br /> Barcode: <?php echo $_REQUEST['bc']; ?><br /> Price: <?php echo $_REQUEST['price']; ?><br /> <input type = "submit" name = "submit" value = "Update"> <input type = "hidden" name = "item" value = "<?php echo $_REQUEST['item']; ?>" > </form> </body> </html> and updates my sales in phpmyadmin: <?php mysql_connect("localhost", "root", "group8"); mysql_select_db("testsite"); $num_qty = $_REQUEST['qty']; $query = mysql_query("SELECT * FROM items WHERE Item = '".$_REQUEST['item']."' "); while($row = mysql_fetch_assoc($query)){ $item = $row['Item']; $oldqty = $row['Qty']; $price = $row['Price']; } if($num_qty < $oldqty){ $qty = $oldqty - $num_qty; $total = $num_qty * $price; mysql_query("INSERT INTO `sales`(`Date`, `Item`, `Qty`, `Item Cost`, `total`) VALUES( CURDATE(), '$item', '$num_qty', '$price', '$total')" ); mysql_query("UPDATE items SET Qty = '$qty' WHERE Item = '$item' "); echo "<p style = 'color:red'>Updated!</p>"; include("items.php"); }else{ echo "<p style = 'color: red'>Not enough $item =".$item."</p>"; include("update_sales.php"); } ?> any help is appreciated! thank you! ^^
  7. sooo.... im making a software for my thesis using php sa the scripting language and mysql as the database (phpmyadmin from XAMPP) however, i don't know how to create an exe file. google says i should use bambamlam but im not sure if it can be linked to phpmyadmin from XAMPP. any suggestions? thank you.
  8. Hey there! looks like I'm not the only one with that motive haha ^^ Hope to get along with you! -- en
  9. since my question is kinda related to this, ill post here. if by chance i shouln'dt have, pls tell me. thank you. im currently a novice on php and other web developing languages (i.e. php, html, javascript etc...). Im studying php since I need this for my thesis (my teacher required this ). I've read that before I study php I have to have some knowledge in html and javascript (which i don't have ) so the question is: is there a way (or a website specifically ) where even a complete begginer like me can understand? I'm trying to study html right now (since most of the tutorials I found about php had html codes that I don't get) but im not sure if im can add javascript too ( studying 3 programming languages at the same time would be quite the stress ). any help is appreciated. thank you!
  10. (correct me if i'm wrong so...) try checking it? 1. If Variable 1,2 and 3 have the values 3,5 and 7 respectively, select the correct sequence of equations that will result in placing values 12 in variable 1 and 15 in variable 3. (Use only ADD operator) 1) 1 + 2 = 3 2) 2 + 3 = 1 3) 3 + 2 = 3 4) 2 + 1 = 2 5) 2 + 2 = 3 6) 2 + 3 = 3 variables: one = 3, two = 5, three = 7 goal: one = 12 and three = 15 your answer: 1,3,5 check: 1 : one + two = three => 3 + 5 = 8 /// three = 8 so: one = 3, two = 5, three = 8 3: three + two = three => 8 + 5 = 12 ///three = 12 so: one = 3, two = 5, three = 12 5: two + two = three => 5 + 5 = 10 ///three = 10 so: one = 3, two = 5, three = 10 /// conditions have not been met. one should be equal to 12 ( one = 12) and three should be equal to 15 (three = 15) also your answer should be in the choices (i.e the a, b, c choices ) try using these method and see if you can find the answer (i've tried it)
  11. Hi there! im studying it at home too ^^ hope to get along with you!
  12. Happy New Year to you too! ^^ my new years resolution: 1. get in better shape 2. get better in programming (top priority) 3. get smarter (though i think that'll be hard O.O )
  13. hello, i've just started learning php at w3schools.com and i've stumbled upon the function known as "preg_match". it says it can be used for validation (like the syntax of emails) but when I see the code I got confused. $name = test_input($_POST["name"]); if (!preg_match("/^[a-zA-Z ]*$/",$name)) { $nameErr = "Only letters and white space allowed"; } i can understand that the "[a-zA-Z]" is a regex meaning that it should only contain lowercase/uppercase letters but I don't quite get what "/^" and "*" is for. another example that got me even more confused is this: $email = test_input($_POST["email"]); if (!preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/",$email)) { $emailErr = "Invalid email format"; } I know that "\W" is another regex but the "(-@+" combinations are quite mind boggling. and the last example got even worse: $website = test_input($_POST["website"]); if (!preg_match("/\b(??:https?|ftp):\/\/|www\.)[-a-z0-9+&@#\/%?=~_|!:,.;]*[-a-z0-9+&@#\/%=~_|]/i",$website)) { $websiteErr = "Invalid URL"; } I've tried searching the function on google and so far ive understand that the letters and other symbols (i.e. \i, \b, \w, $ ) are called "regex" yet im still getting more confused with this so called "patterns" and its other parameters. I've searched the whole page suggested by google and yet with every search i just get more and more confused. can anyone help me? Thank you!
  14. sooo... Hi there! I'm enil14someone (just call me "en" if my usernames too long). *thinkingofwhattosaysoitwouldn'tlooklikeaninterview* o.k so for now im trying to study about php (since it look interesting and i need for my course) and I though that if i'm learning it, I should try and join a community so I could improve (i'll also try to help but I think that'll be hard since im a complete novice at this) so that's how I came to this. Hopeto get along with you!
×
×
  • 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.