- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 17
- Posts with Upvotes
- 14
- Upvoting Members
- 15
- Downvotes Received
- 3
- Posts with Downvotes
- 2
- Downvoting Members
- 3
- Interests
- PHP, MySQL, CSS, Jquery
- PC Specs
- Windows 10
34 Posted Topics
Re: From what I can see, the php file creates the variable $text1 and the html file references the variable $text1, but the html file doesn’t include the php file which has to be done with php. | |
Re: Use cURL. $token = 'your_nypl_api_token'; $curl = curl_init(); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_URL, 'http://api.repo.nypl.org/api/v1/items?identifier_type=local_bnumber&identifier_val=b########'); curl_setopt($curl, CURLOPT_HTTPHEADER, array( 'Authorization: Token', "Token: $token" )); $resp = curl_exec($curl); curl_close($curl); echo $resp; You can get more info about the API your using at this [Link](http://api.repo.nypl.org/#api_params_doc) | |
Re: Have you tried giving your frame a target of the iframe you want to load the response into? Like this: `<form target="frame-menu">` ![]() | |
Re: Like diafol has mentioned to you many times in another thread, you need to go ask this question on the [Javascript Forum](https://www.daniweb.com/web-development/javascript-dhtml-ajax/117) since you're question is javascript based. | |
Re: For starters, why do you close PHP then open it again right after closing it? ?> <?php | |
Re: Why don't you grab all the data you want displayed all in one sql call instead of grabbing just the ID's, then grabbing the data that goes with the ID. You can use the 'ORDER BY' sql command to order from highest ID, and you can use the 'LIMIT' sql … | |
Re: This shows each subject_name in separate rows with subject_name as the table field. student_code subject_code subject_name marks 01 01 Kiswahili 50 01 02 English 50 01 03 Hisabati 40 01 04 Huji 44 01 05 Stadi Za Kazi 36 01 06 Sayansi 42 This shows each subject as a separate … | |
Re: If your talking about actually selling websites there is https://flippa.com/ . If your talking about selling themes there is http://www.mojomarketplace.com/sellers . | |
Re: Another way: switch($q1) { case 'Cite': case 'Define': case 'Enumerate': case 'Index': case 'Indicate': $level = 1; break; case 'Add': case 'Approximate': case 'Articulate': case 'Associate': $level = 2; break; case 'Acquire': case 'Adapt': case 'Allocate': case 'Alphabetize': $level = 3; break; case 'Analyze': case 'Analyse': case 'Audit': case 'Blueprint': … | |
Re: Usually giving an alternative requires showing us what you've come up with. I always process and validate all form data before storing in a database. And I usually only store data as JSON into a database for multiple values, like data from checkboxes. I'll be happy to give more input … | |
Re: On line 20, I did the following and can see the echo'd code just fine. `echo(htmlspecialchars($test));` ![]() | |
This is a function I created to facilitate the sending of PHP emails. Just give it the name and email of who your sending it to, and your name and email. A subject and a message. These options are required. The type, cc and bcc options are optional. By default, … | |
Re: May 31st, 2013. I'll be putting something toether. | |
Re: Try using this function that I created: [SEND EMAIL FUNCTION](http://www.daniweb.com/web-development/php/code/470958/send-email-function) | |
Re: `fclose($open);` should be `fclose($fopen);`. | |
Re: In javascript, it might be best to use: window.location.replace('page_to_redirect.php'); | |
Re: When creating functions you shouldn't echo out data from within the function, but instead return the data and echo out the returned results. <?php function get_posts( $user_id ) { $userid = [b]$user_id[/b]; $query = mysql_query("SELECT * FROM `posts` WHERE `auth_id` = '$userid'"); if( @mysql_num_rows( $query ) > 0 ) { … | |
Re: Just for information, the NC flag in an htaccess does not convert uppercase letters to lowercase, it's to specify that you will allow both uppercase and lowercase letters. So if you point to an image like this "image.jpg" or "image.JPG", they will still point to the same image. But if … | |
Re: I need to see the contents of userauth_include.php to determine the problem. | |
Re: Try this: $SalesImage = $_FILES['SalesImage']['tmp_name']; ![]() | |
Re: I would make sure the id and status variables are defined as integers by doing this: $id = (int) $_POST['id']; $status = (int) $_POST['enabled']; Then I would remove the apostrophe's from around the integers in your query: mysql_query("UPDATE staff SET enabled = $status, name = '$name', password = '$password', email … | |
Re: Well first off, you should put all php functions before html. Second, you didn't define an action in your form. Third, the "onclick" attached to your submit button makes a call to a javascript function, not a php function. | |
Re: I'm not sure I understand your request. Are you asking for a title for an enrollment system application? | |
Re: //301 Redirect Entire Directory RedirectMatch 301 newsite/(.*) /$1 | |
Re: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ $1.php [L,QSA] | |
Re: Maybe you might find this one better: function getip() { $ip = ""; if (isset($_SERVER)) { if (!empty($_SERVER['HTTP_CLIENT_IP']) && validip($_SERVER['HTTP_CLIENT_IP'])) { $ip = $_SERVER['HTTP_CLIENT_IP']; }else if (!empty($_SERVER['HTTP_X_FORWARDED_FOR']) && validip($_SERVER['HTTP_X_FORWARDED_FOR'])) { $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; }else{ $ip = $_SERVER['REMOTE_ADDR']; } }else{ if (getenv('HTTP_CLIENT_IP') && validip(getenv('HTTP_CLIENT_IP'))) { $ip = getenv('HTTP_CLIENT_IP'); }else if (getenv('HTTP_X_FORWARDED_FOR') … | |
I have a .htaccess file. I have two RewriteRule's that do the same thing. This one works perfectly, and can handle a huge query: RewriteRule ^p/(.*)(/?)$ index.php?p=$1 [QSA,L] This one will only handle a query up to 255 characters. RewriteRule ^(.*)(/?)$ index.php?p=$1 [QSA,L] How do I fix this, and make … | |
Re: In your php file, you reference the value from the form dropdown using this variable: $_POST['stat'] | |
![]() | Re: You need to use the [QSA] flag. Check out this page for reference: http://httpd.apache.org/docs/2.2/rewrite/flags.html |
Re: Can I take a look at more of your code? Then I would feel better suited to give you an answer. | |
Re: Actually Phorce, in the code you gave him, your sql query only selects those from the database that are active. I believe he wants everything selected from the database and those that are active to be displayed with a link, and those that are inactive to display without a link. … | |
Re: I'd start by reading a book on PHP coding. I don't mean this in a mean, I just mean that if you'd really like to learn how to code in PHP, then there are a lot of really good books out there. | |
Re: Don't forget to make the ID field in MySQL unsigned and NOT NULL. ID int(11) unsigned NOT NULL auto_increment primary key | |
Re: What does the "Achievement" table in your database look like? Not the content, just the structure. Also, it seems to me like you may have more going on there than is really needed. |