PravinS
Members-
Posts
459 -
Joined
-
Last visited
-
Days Won
2
Everything posted by PravinS
-
Yes, you can now use XML parser or download some XML parsing class
-
Try this <?php $file = "http://book.find-services.co.uk/bookCategories.aspx?site=Purelybooks"; $xml = simplexml_load_file($file); var_dump($xml); ?>
-
Change submit button text based on radio button selected
PravinS replied to HDFilmMaker2112's topic in Javascript Help
Use this JS function function changeButton(selection) { var t = selection.charAt(0).toUpperCase() + selection.slice(1); el = document.getElementById('submit_button'); el.value = 'Sign Up for '+t+' Membership'; } -
View this value inside this array (or double array)?
PravinS replied to riahc3's topic in PHP Coding Help
You need to check [label] == Corte, then you will get [value] and [option_id], try this below code, it will come in your foreach loop <?php if ($_option['label'] == 'Corte') { echo $_option['value']; echo "<br>".$_option['option_id']; } ?> -
Refer the URL, may this will help you http://www.phpclasses.org/package/5988-PHP-Retrieve-MySQL-query-results-into-arrays.html
-
add an element to array without using build in function
PravinS replied to piyusharora420's topic in PHP Coding Help
Use this function <?php function addstart($array=array(),$newval) { $new_array = array(); $new_array[0] = $newval; if (is_array($array)) { foreach($array as $key => $value) { $new_array[] = $value; } } return $new_array; } ?> -
How to install php on window?
PravinS replied to vikasbook's topic in PHP Installation and Configuration
Install wampserver, WampServer is a Windows web development environment. It allows you to create web applications with Apache2, PHP and a MySQL database download it from http://www.wampserver.com/en/ -
First upload default home page (index.html,index.php etc) and add redirect to login.php code in home page
-
Add if condition before the image link tag, check the below code <?php if (file_exists("../smallphotos/".$photo6.".jpg")) { ?> <a href="../smallphotos/<? echo $photo6; ?>.jpg" rel="lightbox[Villas]" > <img src="../smallphotos/<? echo $photo6; ?>.jpg" width="280" height="210" border="1"> </a> <?php } ?>
-
Inserting Data in MySQL Database with $_FILE Error
PravinS replied to liamk's topic in PHP Coding Help
To upload files we have use enctype="multipart/form-data" form attribute in form tag -
Try this code do { $class = ''; if ($page['status'] == 0) $class = 'class="inactive"'; echo '<table width="150" border="0"> <tr><td align="left" valign="top"> <a href="edit-page.php?page='.$page['pageid'].'" '.$class.'>'.$page['pagename'].'</a> </td></tr> </table>'; } while ($page = mysql_fetch_assoc($pagesq));
-
array_merge() does not support 2 or multiple dimensional array and array generated by your code seems to be 2 dimensional
-
Checking a value in a unique index doesn't exist before doing INSERT query
PravinS replied to stubarny's topic in MySQL Help
Before your INSERT query write a SELECT query which will check "website_page_name" in table, if SELECT query returns any result then give error message that "record already exists" else insert record in table. Also you can set UNIQUE key for "website_page_name" field of table then you will not need to write above SELECT query. -
Please check "post_max_size" in PHP.INI file
-
I don't see FORM tag in your code...
-
Its a 2 dimensional array and array_unique does not support 2 dimensional array
-
set only width or height, don't set both... it will be seen in proportion
-
It depends on requirement, if cookie is set then user will be directly logged in without login screen or else you can come to login page and fill the login screen using cookie data, so that user can use same login details or can change it and submit the form. May this will help u
-
Dynamically adding dimensions to an array using for loop
PravinS replied to Tanner's topic in PHP Coding Help
You have used explode() function, it will require delimiter character, as first parameter in function. -
Use combination of STR_TO_DATE(), DAY(), MONTH() and YEAR() functions in MYSQL.
-
Try SELECT * FROM tblname WHERE STR_TO_DATE(expiry, '%d/%m/%Y') <= DATE(NOW());
-
You can use MYSQL STR_TO_DATE() function to convert your date in DATE format and then you can compare it will current date.
-
Use below given tag for textarea <textarea name="area" cols="50" rows="3"><?=$value?></textarea>
-
Give array name to checkbox like name="topic[]" and assign some value to it. When form is posted you will get checked values in array format.