[Solved] Create Code Snippet (easy to cut and paste) from Web Form [closed]

something like this, using val() to get the input from the user: HTML: name:<input type=”text” id=”name” /> <br /> price:<input type=”text” id=”price”/> <br /> description:<input type=”text” id=”description”/> <br /> url for event:<input type=”text” id=”url_for_event” /> <br /> <button id=”create-html”>create html</button> <div id=”result”></div> JS: $( “#create-html” ).click(function() { var name=”<p class=”name”>” + $(“#name”).val() + ‘</p>’; var … Read more

[Solved] I am anable to replace comment- in php [duplicate]

$string = str_replace(“comment-“, “”, “comment-454”); should replace what you want. you mentioned comment-454 came from your database. So ill assume it’s in $result. Now you can do: $string = str_replace(“comment-“, “”, $result); echo $string; 2 solved I am anable to replace comment- in php [duplicate]

[Solved] My login php script that redirects to each user page [closed]

Sounds like you are wanting to use Query Strings. There are plenty of resources online to help you out. Here are some examples: https://lightignite.com/help-your-customers-fill-out-web-forms-with-url-query-strings/ http://richard.jp.leguen.ca/tutoring/soen287/tutorials/query-strings-and-forms/ 0 solved My login php script that redirects to each user page [closed]

[Solved] remove part of url from google API [closed]

One approach would be to use the parse_str() and parse_url() functions. You can use this to separate the string information to find a certain parameter value. parse_str(parse_url($urlString, PHP_URL_QUERY), $array) All of the parameters would be stored in the $array variable. Credit: https://stackoverflow.com/a/3136450/2748747 solved remove part of url from google API [closed]

[Solved] My rounding impossible (Javascript and PHP)

Maybe this? <?php $num = ‘49.82’; $new_num = $num; $hundredth = substr($num, -1, 1); switch($hundredth) { case ‘0’: break; case ‘1’: $new_num = ($new_num – 0.01); break; case ‘2’: $new_num = ($new_num – 0.02); break; case ‘3’: $new_num = ($new_num – 0.03); break; case ‘4’: $new_num = ($new_num – 0.04); break; case ‘5’: break; case … Read more

[Solved] How to solve this mathematical equation in php [closed]

Just group the D’s first and dont hardcode the indices, use $i $S = array(); $D = array(); $M = array(“1″=>30,”2″=>31,”3″=>30); $Y = array(“1″=>360,”2″=>360,”3″=>360); $O = 30000; $P = 0.3; $N = 10509.74; for($i = 1, $size = count($M); $i <= $size; $i++){ $final_D = 0; // group the D’s first (O-D1), (O-D1-D2), … and … Read more

[Solved] Check availability and list available rooms [closed]

Logic is actually pretty simple here, you don’t want anything where the start and end are inside your period, or where they’re at opposite sides of any point in the range you’re looking for. SELECT R.roomID, R.name, R.facilities FROM — Use the table rooms, but name it R for shorthand. Rooms R — Left joins … Read more

[Solved] Need help linking 2k files into html [closed]

Given your specific situation as explained in the chat, you have no access to the ‘back end’ you DO have access and permission to change the directory-structure and file-names of the course-materials (pdf-files) current path & filenaming conventions are a mess (don’t exist) and unpredictable there is currently nothing linking course-codes with course-descriptions/course-materials every course … Read more

[Solved] DOMDocument : some basic questions [closed]

both are <div id=”one”> Note the all the h1, h2 and blockquote nodes are childs of this one. $dom->getElementById(0); would return the first element. $dom->getElementById(1); would return the second (if it existed) id is the name of an attribute in this tag <div id=”one”> Do not understand the question. what do you mean by single … Read more