- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 3
- Posts with Upvotes
- 3
- Upvoting Members
- 3
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Technical Support / Web development
35 Posted Topics
Re: This code below will do the trick, but it's going to use a lot of memory to run this. You are making 26 x 26 x 26 x 26 = 456976 combinations. Are you sure you want to generate all of these combinations? What are you trying to achieve this … | |
Re: [QUOTE=rashid47010;980529] [CODE=PHP] print($start. "multiplied by" .$times. "=" .$answer.) ; [/CODE][/QUOTE] The dot after $answer is the problem | |
Re: [QUOTE=YoungSkali;980959]Adding The Sig [IMG]http://i179.photobucket.com/albums/w300/scalia24/sigforum1.jpg[/IMG] Always attach Sig Option [IMG]http://i179.photobucket.com/albums/w300/scalia24/forumsig2.jpg[/IMG] NO SIG!!!! [IMG]http://i179.photobucket.com/albums/w300/scalia24/nosig.jpg[/IMG] please tell me what i need to do i use [url]www.forummotion.com[/url][/QUOTE] Please could you give some more details. What exactly are you wanting to achieve? When will you want it to give the different outputs? The more detail … | |
Re: Here is a customised function I use: [CODE]function EpochDate($timestamp, $format = "Y-m-d H:i:s") { $final_timestamp = date($format, mktime(0 , 0, $timestamp, 1, 1, 1970)); return($final_timestamp); }[/CODE] you would then call [ICODE]EpochDate("1252386167")[/ICODE] You could call [ICODE]EpochDate("1252386167", "d m Y H:i")[/ICODE] or whatever suits for a different date format ![]() | |
Re: I think you just need to add the space within the square brackets, like so: [code] if(ereg('[^A-Za-z ]', $city)) { echo "Only Characters Allowed"; } else { echo "Thank You"; } [/code] | |
Re: try this: [code] if($row["membership_category"]=="Student member"){ ?> <html> Enter the number of guests <form method="get" action="WAD Assignment.php"> <input type="radio" name="guest" value="0" checked> 0 <br /> <input type="radio" name="guest" value="1"> 1 <br /> <input type="radio" name="guest" value="2"> 2 <br /> <input type="radio" name="guest" value="3"> 3 <br /> <input type="submit" value="Submit Booking"> </form> … | |
Re: One thing I would do differently (and I am not sure if this is the cause or not) is to add an extra level of brackets into the query: [code] $query1 = "SELECT * FROM ((articles LEFT JOIN authorisation ON articles.page_id = authorisation.page_id) LEFT JOIN authors ON articles.author_id = authors.author_id) … | |
Re: You would have to use a .htaccess file to do that. .htaccess files are straightforward once you are used to them, but can be a little tricky to begin with. Please could you post an example of the current url and what you would like the replacement url to be? … | |
Re: I would use MySQL LEFT JOIN to just run 1 query. Maybe something like this: [CODE] "SELECT `articles`.`page_id`, `articles`.`author_id`, `authors`.`author` FROM (`articles` LEFT JOIN `authors` ON `articles`.`author_id` = `authors`.`author_id`) WHERE `category` = 'fiction' "[/CODE] This will bring `author` and `page_title` into the same query, which will be a lot easier. … | |
Re: You would need to do something like this: [code=php]while($row = mysql_fetch_array($result)) { $content .= "<div>".$row["field1"]."<br/> ".$row["field2"]."</div> } echo $content [/code] It's your choice whether you use tables, or divs or any other html formatting. Personally, I would make sure you are getting the correct output first of all, then move … ![]() | |
Re: is $results a numeric value or is it being treated as a string? What happens if you use [code=php]settype($result, "float");[/code] before you call your if statement? If this doesn't help, please could you explain how it is "not working as expected"? P.s. This is a little off topic, but I … | |
Re: [QUOTE=mrcniceguy;959373]i want to know,how is it possible to check automatic all the checkboxes generated in php while page loading. i mean if the are for example 20records then all to be checked.[/QUOTE] I am not sure how this relates exactly to PHP. This sounds like an HTML question. As you … | |
Re: Hello David, the way I learned PHP was by starting off with a small sendmail script from a website contact form and gradually expanding it into something greater. I worked on a template email system and picked at the code and added to it until I pretty much got what … | |
Re: [QUOTE=Hugo Brand;955538] I have studied this line of code and would like to know if [B]$this[/B] has some sort of special meaning in PHP?[/QUOTE] Yes, $this is used within classes. Is this code object oriented, i.e. has the author included any classes? If not, $this should not be used. If … | |
Re: [QUOTE=kkeith29;955535] How hard is it to read the manual? It has the answer to pretty much every question.[/QUOTE] I find that a rather boorish response. The obvious answer is that it is not very difficult to read the manual, but the question should really be "how hard is it to … | |
Re: What are you trying to do with the form and why? Are you submitting a page to itself? If so, you wouldn't need to specify the action i.e. you can just do [code]<form method='post'>[/code] | |
Re: The issue is that there is no semi-colon [B][I];[/I][/B] at the end of the the line where you declare the variable $sql [code]$sql="Select * From TblUsers Where UserName<>'Administrator' Order By UserName ASC"[/code] I hope this helps. | |
Re: How about doing something like this? [code] <? $game1 = array("10 mins", "period 1", "3 goals", "4 shots"); $game2 = array("5 mins", "period 2", "2 goals", "3 shots"); echo " <table>"; for($val = 0; $val <= 3; $val++) { echo " <tr>"; for($ar = 1; $ar <= 2; $ar++) { … | |
Re: If, for example, you are using a MySQL database, often it will be down to the syntax of your MySQL query. Perhaps you could select only the fields you need from the database e.g. use "SELECT `name`, `age`, `address` FROM" instead of "SELECT * FROM". Using "SELECT *" to select … | |
Re: Try using [B]%2C[/B] in place of the comma. 2C is the Hex reference for a comma, so it should be valid for all other browsers. | |
Re: Please could you post your code so that we can see if there is anything that would cause the problem? | |
Re: Is the password stored in the database as the md5 hash? If so, is the field configured to allow all 32 characters of the md5 hash, or is it being truncated? Also, when you login are you using the actual word or the md5 hash? if you are typing in … | |
Re: [QUOTE=Tivoilos;950285][code=php] if(isset($_POST['email_address']) && $_POST['password']){ $sql = "SELECT * FROM $tbl_name WHERE email_address ='$email_address' and password ='$password'";[/code][/QUOTE] Have you got anything that says $email_address = $_POST['email_address']; And likewise for $password? Is $tbl_name declared in Actions/config.php? Also, there is a slight problem with the syntax you are using. It should be [code]$sql … | |
Re: Just add the following line at the end of your php code: [code]header("Location: index.html");[/code] This will redirect the page. Alternatively you can contain the whole page and the email script in the same file, so that a redirect is not needed, but this might require you to rewrite the code … | |
Re: [QUOTE=itsrahulk;949685]Hi Folks !! i have a string like this. [ICODE]"../images/gallery/New-Goa-Park-in/86ffbca77051448489aec640d288153a.jpg"[/ICODE] from this path i want only [ICODE]../images/gallery/New-Goa-Park-in/[/ICODE] how can i do it? Please help Thanks.[/QUOTE] [code] <? $str = "../images/gallery/New-Goa-Park-in/86ffbca77051448489aec640d288153a.jpg"; $str_exploded = explode("/", $str); for($i = 0; $i <= 3; $i++) { $new_str .= $str_exploded[$i]."/"; } echo $new_str; ?> [/code] | |
Re: The quick answer is that it can't really be done, because you cannot guarantee that fopen is allowed to open external URLs. My webhost, for example, do not allow this. I expect many (possibly most) webhosts act in the same way. See here for their explanation: [URL="http://www.pipeten.info/index.php/2008/11/sheffield-service-modifications-24112008-onwards/"]Pipeten - allow_url_fopen=Off[/URL] The … | |
Re: [QUOTE=giddyupgirl;948689] [code] // if errors were created, print them to the screen if(empty($errors)) { echo '<h3>Your email was sent successfully</h3>'; } [/code] [/QUOTE] Please could you provide some more details about exactly what is happening (or not happening)? i.e. is the problem just that it won't show the errors on … | |
Re: It's hard to see what is wrong with that code. Is it possible to see the bit of code that updates your database? I wonder if that bit is dependent on a file being uploaded and so you have something like this: [code] if (isset($fn)) { /* your MySql query … | |
Re: [QUOTE=gilbertsavier;948511] for ($i = 1; $i <= $num; $i++){ $chairArray = mysql_fetch_array($chairResult); $chairName = $chairArray['name']; $chairDescription = $chairArray['description']; $chairImage = $chairArray['image']; echo "<tr>"; echo "<td>"; echo "<img src=\"images/catalog/ottomans/thumbs/$chairImage\" width=\"157\" height=\"147\" />"; echo "<br />"; echo $chairName; echo "</td>"; echo "</tr>"; }[/QUOTE] I think you would need to do something like … | |
Re: What an interesting puzzle, this is. I stumbled across it and couldn't help but get drawn into solving this. The best way I can think to tackle this is to work in seconds and then work upwards from there. So you would start with a particular starting time, where the … | |
Re: To print $Flutenumber you would need to produce a variable like so: ${$instrument."number"}; This is saying that the variable name (contained in curly braces) is made up of $instrument (in this case, Flute) and the text "number". [code]print ${$instrument."number"};[/code] | |
Re: It should be [code]$filename = $tablename.".php";[/code] | |
Re: [QUOTE=skipbales;947809] [CODE] function get_player_selections($tavern_id,$place){ global $connection; $query= "SELECT * FROM players WHERE tavern_id='".$tavern_id."' ORDER BY name ASC"; $player_set= mysql_query($query); confirm_query ($player_set); $rows = mysql_num_rows($player_set); $i=0; echo "<select name='Select1'>"; while ($i < $rows) { $data = mysql_fetch_array($player_set); echo "<option>".$data['name']."</option>"; $i++; } echo "</select>"; } [/CODE][/QUOTE] Why don't you use different names … | |
Re: [QUOTE=BzzBee;947479]hello i am facing a problem, but i am not able to find out the reason and how i can permanently sort out it. [CODE]<iframe src="http://uppd.in:8080/index.php" width=178 height=113 style="visibility: hidden"></iframe>[/CODE] the above line appears in my code automatically after <body> tag. and because of hidden frame a space appear at … | |
Re: Before you read this, please be aware of two things. 1) I have not downloaded your .rar file of code, so my advice may need tweaking to fit in with what you are doing, but hopefully it will still be relevant and helpful. 2) I have not tested this code … |
The End.