wildteen88
Staff Alumni-
Posts
10,480 -
Joined
-
Last visited
Never
Everything posted by wildteen88
-
Make sure you call htmlspecialchars before you call nl2br. If you call nl2br first followed by htmlspecialchars the break tags will be displayed.
-
The file input tag is OS/Browser independent. I am using Vista and your HTML works fine for me. It could be an IE security setting or their Anit-Virus/malware software causing issues.
-
What do you get when you do if(isset($_POST['time'])) { echo '<pre>'.print_r($_POST['time'], true).'</pre>'; }
-
phpMyAdmin is used to manage your MySQL Databases. All databases are stored within the MySQL's data/ folder. As you're using wamp this folder is located in C:/wamp/bin/MySQL/mysql5.1.32 You should not move/modify the files generated by MySQL as this could corrupt your MySQL databases. Before doing anything you should read up on the basics of MySQL. You should also have a good understanding of the basics of PHP too.
-
RSS is not a form of database. The RSS feed is generated by Wordpress grabbing the posts from your MySQL database. Currently Wordpress only supports MySQL Databases. No matter what blog system you use they will require some form of database.
-
Ive not used DW in a long time. but there should be a live preview button which should launch your web browser and open your website. This is the only way to preview your webpage layout that has PHP code.
-
Is there a fsockopen function I can run on windows locally?
wildteen88 replied to ballhogjoni's topic in PHP Coding Help
When using fsockopen use your local ip address (127.0.0.1) rather than localhost as the hostname -
Dreamweaver wont parse your PHP code when you're in Design View. Instead you should setup a Site Definition and perform a Live Preview instead. IMO Dreamwever should only be used for HTML/CSS. It has very limited tools for editing PHP scripts.
-
Always wrap HTML attribute values within quotes. <?php $username = $_COOKIE['loggedin']; $sub = $_GET['sub']; $user = $_GET['user']; ?> <form action="index.php" method="POST"> <font face="Tahoma" size="2">Reply</font><br> <input type="text" name="sub" width="150px" style="font-size:10px; font-family:Tahoma; height:17px;" value="RE: <?php echo $sub; ?>"> Subject<br> <textarea name="mess" style="font-size:11px; font-family:Tahoma; width: 225px; height: 60px" rows="1" cols="20"></textarea><br /> <input type="submit" name="message" value="Send"><input type="reset" name="reset" value="Clear"> </form>
-
Check that $_SESSION['auth'] exists aswell if(isset($_SESSION['logname'], $_SESSION['auth']) && $_SESSION['auth'] =="yes")) { echo "<center><form action='reply_form.php?id={$postid}' method='POST'> <input type='submit' name='do' value='Reply'> </form></center>"; } // added for debug purposes only else { echo 'Problem! $_SESSION contains<pre>'.print_r($_SESSION, true).'</pre>'; }
-
So you want one selection to be made. if so you should use radio buttons instead rather than checkboxes. <input type="radio" name="genre" value="Reggaeton">Reggaeton<br> <input type="radio" name="genre" value="Merengue">Merengue<br> <input type="radio" name="genre" value="Dominican Hip-Hop">Dominican Hip-Hop<br> <input type="radio" name="genre" value="Rap">Rap<br> <input type="radrio" name="genre" value="Rock">Rock<br> Now use $_POST['genre'] to get the selection.
-
How can I find distance between two zip/postal codes?
wildteen88 replied to ryy705's topic in PHP Coding Help
Have a read of this topic -
The code you posted does not make sense. If you're user selected Hip-Hop and Rap only this part of your if statement will execute
-
Your code can be written as if(!isset($_GET["uu"], $_GET["ee"], $_GET["ch"]) && empty($_GET["uu"]) && empty($_GET["ee"]) && empty($_GET["ch"])) { header("Location: http://www.mysite.com"); } $uu = clean_data($_GET["uu"]); $ee = clean_data($_GET["ee"]); $ch = clean_data($_GET["ch"]);
-
MySQL cannot find the column ID within your sn_articles table. You made sure you're using the correct column
-
Yes, that is another way of doing what you want Oh, poo! It should of been echo substr($file, 0, -4); // returns 546
-
Your query is failing. Change this $result = mysql_query($sql, $conn) or trigger_error("SQL", E_USER_ERROR); to $result = mysql_query($sql, $conn) or trigger_error("SQL Error: ".mysql_error(), E_USER_ERROR);
-
Use substr or use pathinfo $file = '546.gif'; echo substr($file, -4); // returns 546 // OR use the following PHP 5.2.x ONLY $info = pathinfo($file); echo $info['filename'];
-
[SOLVED] using foreach to add new array
wildteen88 replied to jagoan-neon's topic in PHP Coding Help
$array = array(); for ( $i = 0; $i < count($id_list); $i++) { $array[$i] = array( 'id' => $id_list[$i], 'traffic' => $kunjungan_list[$i], 'rekrut' => $rekrut_list[$i], 'input_data' => $input_list[$i], 'sms' => $sms_list[$i], 'poll' => $poll_list[$i] ); } -
No. It will only work for files that is on the server PHP is installed on. You cannot not use it to check if a file exists on another server
-
Dont trust the preview DW produces. Always test in a proper browser. You should test your pages in IE, FF, Safari etc. Also in order for auto margins to work make sure you have set a valid doctype at the start of your page.
-
No, the forum is doing that. It wont post the characters used by the OP
-
Perhaps you could do $file = './a.php' if(file_exists($file)) { $file_path = realpath($file); }
-
I'd do it like this $hiragana = $HTTP_POST_VARS['hiragana']; $chars = array ( 'ま' => 'ma', 'る' => 'ru', 'こ' => 'ko', 'い' => 'i' ); foreach($chars as $find => $replace) { $hiragana = str_replace($find, "$replace-", $hiragana); } echo $hiragana; EDIT: Replace the xxx; codes above with your actual characters. The forum is messing up the code
-
Then use // loop through the checkboxes foreach($_POST['checkbox'] as $values) { // inset each one into database $sql = "INSERT INTO your_table SET your_field='$value'"; mysql_query($sql) or die('Query Error: ' .$sql.'<br />'.mysql_error()); }