Jump to content

Glese

Members
  • Posts

    166
  • Joined

  • Last visited

    Never

Everything posted by Glese

  1. So what would be your recommendation when working on a localhost server and then uploading the project to a public server? I do have my own system working with paths, but I think it still can be better, but I also know the possibilities are limited, and PHP does not have a specific path system.
  2. header('Location: ' . $register_success); $register_success = 'register_success.php'; The header function above gets executed after a successful registering, and the variable is stated in the path.php file, which gets included into the header.php file, which also is included into the page, and also into the page with the register form. The register form is contained in the path model/register/register_script.php, and the file register_success.php is in the same folder. The problem I am having is that the header function does redirect to controller/register/register_success.php this used to be the previous location of that file. I am wondering is the old path saved somewhere in the cache, and this all is actually a caching problem? It does not seem to be a caching problem of the internet browser because I cleaned the cache out. What else could be the cause for this problem? If it is a caching problem, which cache could be, as in in which location?
  3. Just to clarify, services are good ideas, though I also consider advertisement regarded profits.
  4. I spent quite some time learning PHP and it took quite a bit to learn, but I did learn it, and I think I should now earn it. I also think there's only so much you can do on the internet, and a lot is already around. And in this sense I am wondering which types of application do promise a profit? I personally think I can program it all without trying to sound over-confident, I just think it may take a while and a bit, especially an investment of effort, other than that not much seems impossible, just tedious. What are the suggestions? Perhaps some you may already have application which gross a profit and you may know what is prone to work.
  5. I am using XAMPP and did not think of installing Apache and MySQL, it is a good tip though.
  6. I am looking to create a small application to save short notations, and I am wondering is there a continuously running localhost server application, which I do not have to start and close each time, which also starts up at os system start up?
  7. I know it is marketing, I see it loose.
  8. Just in case it got overlooked, I meant the formation HELP of NetBeans which automatically formats when typing the code out. It does format well per se but it also does format wrong at ones. How would you recommend to deal with the wrong formatting and indenting? Do you personally type without any formation help at all?
  9. If the numbers do not add up you do not add up. What are the next possible web 3.0 trends, in your opinion? I like building web application, but I am also interested in building profitable ones. Thus I think, in my opinion, it is best to do this by taking advantage of the next trend when web 3.0 becomes official. What are your thoughts?
  10. Since there are not many qualitative alternatives around. What are the critical difficulties of building a search engine? Imagine it low traffic and lightweight instead of a giant Google dimension, because that is how you start out. I do know by now that a search engine is also possible with PHP and ngnix. Since speed is one factor, I do not know how much the amount of traffic would influence the speed. Would it have a drastic effect? Other than that what else are drastic factors? Once one has a letter system and sorting script and also a bot to gather and analyze, one can start with a dedicated server and aim for a cluster one. And what about the database? Is it considered tedious, cluttered, problematic or can it be learned? Overall, I actually do think there are alternatives around, they are simply not on Google level in my opinion, in this sense, it is probably not that difficult to build and run a search engine, but to have it a high qualitative level may be perhaps. In a way one would have to be a letter crack to sort by quality, and perhaps this is the main critical part next to others.
  11. I like to write code in a readable, clean and also indented way. I think formation help can save time even in PHP, Netbeans does provide it, ZendStudio does not have it at all. Though Netbeans' formation help still does have quirks, and I am wondering is it further adjustable to remove those quirks and make it work more well with PHP? What would you recommend in general regarding formatting PHP code with the code editing software? I simply think I am investing too much time and effort editing, if it just would be efficient manual indenting and then normal typing out I would have a less of a problem with it. I also intend to learn OOP with PHP soon.
  12. I do like that you have to type less with ASP.net, I think certain things could be done just that way in PHP. I often do not like to spend too much time with formatting and indenting, which I have to do in PHP. ASP.net does seem to not have a documentation which I do not like and I also assume the functionality may not match up to PHP. How else does it compare?
  13. Where is the documentation of ASP.net to be found? I can not find it on www.asp.net.
  14. <td > <form action="" method="post"> <b> <?php echo $likes_count; ?> </b> <b> | </b> <b> <?php echo $dislikes_count; ?> </b> <button class="LikeButton" type="submit" name="likes" value="+1">Likes</button> <button class="DislikeButton" type="submit" name="dislikes" value="-1">Dislikes</button> <input type="hidden" name="hidden_con_id" value="<?php echo $con_id; ?>" /> </form> <?php echo $con_id; ?> </td> I have a table with a voting system and the problem I am experiencing is that the hidden id, which I call the hidden contribution id is not set thus the numeric array changes. I know that it is not best practice to use a numeric array for this, though I learned that afterwards. This is the array: // POST BUTTONS inside the table if (isset($_POST['likes'])) { $likes = $_POST['likes']; } if (isset($_POST['dislikes'])) { $dislikes = $_POST['dislikes']; } if (isset($_POST['likes']) || isset($_POST['dislikes'])) { $hidden_con_id = $_POST['hidden_con_id']; } // $array = array ($likes, $dislikes, $con_id, $user_id); if (isset($likes)) { $array[] = $likes; } if (isset($dislikes)) { $array[] = $dislikes; } if (isset($hidden_con_id)) { $array[] = $hidden_con_id; } if (isset($dnuser_id)) { $array[] = $dnuser_id; } As said the problem I have is that the hidden_con_id variable is not set and that consequently array[2] becomes the user_id variable. Any suggestions why it is not becoming set?
  15. What exactly does the entry in the title mean? I cannot make sense out of it. I would appreciate if somebody can shed some light in. The error message occurs when I try to vote with the voting system I created.
  16. I got it to work. Thanks kevin for the explanation, this part of PHP is confusing me a bit.
  17. <?php $user_name = 'bazarr'; $user_password = '*******'; if($_POST['user_name'] != $user_name || $_POST['user_password'] != $user_password) { ?> <h3>The Login</h3> <form method="post" action=""> <input type="text" name="user_name" /> <input type="password" name="user_password" /> <input type="submit" name="blog_creation_login_submit" value="Submit" /> </form> <?php } else { ?> <h3>The Article</h3> With the above script I am getting following notice: Notice: Undefined index: user_name It is regarding the user name variable, my question is how to solve this one and avoid the notice?
  18. fenway, what do you mean by that? Will it not work how I imagined it in the sense of the thread?
  19. It was actually meant for very long & continuous words. Those do not contain a new line as far as I know.
  20. So it is without an equal sign? And I tried Limit = '1', which did not work for me. Thanks for the tip.
  21. I am intending to do a line-break in a specific division and I do manage it, though in the second division I am using pre tags, because I need the submitted data to be as is. Here is an example: <!-- The Contribution Description --> <tr> <td colspan="3"><div class="break_word"><p><?php echo $contribution_description; ?></p></div></td> </tr> <!-- The Separation Line --> <tr> <td colspan="3"></td> </tr> <!-- The Contribution --> <tr> <td colspan="3"><div class="break_word"><pre><?php echo $contribution; ?></pre></div></td> </tr> </table> I am wondering, how can I manage to still have the line-break working as in the first division, and still keep the pre tags intact?
  22. I accidentally executed the following SQL query a moment ago: UPDATE con SET contribution = '$contribution', category = '$contribution_category', description = '$contribution_description' This updated the whole table (every single row), which taught me a lesson. I would like to know is there a way to limit the query to just one single row, to avoid an updating of the whole table on big projects? This happened in the development environment, so it is not a big deal and can be checked as lesson learned. Quite dangerous this one.
  23. I found the mistake and solved the problem, the mistake was in the query itself.
  24. I am trying to create a simple edit script, which means the user contribution should be editable by simply clicking edit and having the contribution printed out in between the textarea tags, so it is inside the textarea. The problem I am having is that the assoc result is not set (I am checking with isset) in the following script, though I need the result to get the contribution and the description of it. Here's the script so far: <?php if((isset($user_id)) && isset($_GET['con_title'])) { $con_title = $_GET['con_title']; $connection = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); $query_get = 'SELECT contribution, description FROM con WHERE user_id = "{' . $user_id . '}" AND name = "{' . $con_title . '}"'; $query_run = mysqli_query($connection, $query_get) or mysqli_error($connection); $assoc = mysqli_fetch_assoc($query_run) or mysqli_error($connection); $edit_description = $assoc['description']; $edit_contribution = $assoc['contribution']; echo ' edit desc: ' . $edit_description; echo ' user id: ' . $user_id; echo ' con title: ' . $con_title; echo ' assoc: ' . $edit_contribution; mysqli_close($connection); } ?> When I print out the edit_description and the edit_contribution variable I get empty space. Any ideas and suggestions why it is not set? I am also not getting any error messages.
×
×
  • 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.