Jump to content

akphidelt2007

Members
  • Posts

    174
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by akphidelt2007

  1. Ok, so let me just clarify what you're saying. When I go to ESPN.com and they have me logged in and are connected to my Facebook account through cookies that are located on my computer that they are accessing. When I use Curl to access ESPN through my localhost, ESPN does not have any cookies they can use to access from my computer like if I'm just using the browser myself?
  2. I might be missing something here. But I'm talking about being the client and cookies that other sites have stored on my computer or server. Is there a way to check those through php to see if they exist? Like to check if I have a Cookie from ESPN and want to delete it before making a curl request. Not sure if it's possible or even makes sense.
  3. Alright, this might be a dumb question, but I've been messing with Curl and testing out different functions. One thing, I'm wondering is if there is a way to use curl to access a site and check to see if that site already has a cookie. For instance, if you access ESPN and you see that they have your Facebook info set up. Is there a way to use Curl to check to see if that Cookie exists. I'm using a localhost right now. So I might be missing something here about how to access cookies on your own computer/server. I would post some test code, but I don't even know where to begin. I know how to set cookies and check cookies for users accessing my sites, but for some reason can't figure out if a site I'm accessing through Curl has a cookie on me. Any help will be appreciated. Thanks.
  4. Alright, I've been doing this for too long to not understand what is going wrong here. This is pretty straightforward. I have one table with the columns... ID | Year | Away_Team | Home_Team -1---2010-----tacoma--------puyallup -2---2010-----puyallup-------renton -3---2010-----renton---------tacoma -4---2010-----puyallup-------tacoma What I want is just a simple count of the total # of games played by year and team regardless of it being an away or home game. Year | Team | Games -2010--tacoma---3 -2010--renton----2 Any help will be appreciated. Thanks
  5. Well array(1,2,3,4) is really array(0=>1,1=>2,2=>3,3=>4). And the names are array(0=>Bob,1=>Joe,2=>Tom,3=>Bill). There's multiple ways you can do this. You can use array_search to find the key based on id. But this is just based on the information you have given. There's probably easier ways to do what you are trying to do if we knew what you were actually doing and how you were doing it.
  6. Someone might be able to spot the problem, but I for one can't at first glance without knowing more information. If I have problems in my code I like going section by section using echo "here"; exit; Or if you think there should be data than echo the variable or print_r($yourdata); exit; Like what does $matches show, what does $comments show?
  7. What does function get_comments look like?
  8. You can work this through preg_replace... $str = '<div class="text"> <mofish id="testing" type="testing" title="true" /> </div>'; $pattern = '/<mofish[^>]*>/'; $replace = 'whatever'; $newString = preg_replace($pattern , $replace , $str);
  9. Edit:: nevermind... scootstah is right.
  10. By no means am I telling you this is what you "should" do, but this would bypass the authorized section and prevent the redirect //after $_SESSION['myusername'] = $myusername; $_SESSION['mypassword'] = $mypassword; $_SESSION['importantnumber'] = $importantnumber; //put $_SESSION['authorized'] = false;
  11. Is $_SESSION['authorized'] set to false anywhere in your script? Otherwise, this redirects you back to the index.php page where your form is. session_start(); if ($_SESSION["authorized"] == true) { header("location:index.php"); }
  12. $_SESSION['myusername'] = $myusername; ...
  13. Unless there is more to the code you aren't showing. How is the form submitted? Also... <a href="#" class="remove">Excluir</td> The <a> needs to be closed both in the html and the javascript that adds a new row.
  14. It's probably generating an error here but error capturing is not set to display the error so it just pops up with a white page. This should bring up a fatal error as it tries to run these as functions because of the parenthesis. $_SESSION("myusername"); $_SESSION("mypassword"); $_SESSION("importantnumber");
  15. Where does $order_id come from? Is it set above the script you showed. All I see is $id = $_GET['id']. Should it be $result->order_id? And when you have you problems with POSTS, print_r($_POST) will help you figure out what is actually getting captured, then you can debug the script at each point to see where the connection is being broken.
  16. Where is the form script that you are using to submit these POST variables?
  17. I've been doing this long enough where I should know this, but I cannot figure out how this would be done with a query to find entries that do not exist between the two tables using their fields without concatenating? What would be just the basic structure of the query? All I can think of is joining the two but I do not know how I can have a join and find entries that don't match at the same time.
  18. So pretty much I have to create a new field that concatenates those values and searches for them between the two tables? I guess that makes sense as a unique identifier is necessary and as I need to make sure all those fields match the new import, that is the only way. Just sucks to have a uid that could be up to 100+ characters long. Thanks.
  19. You have to check to see if $i = the current page. Something like this... //for ($i=1; $i<=$total_pages; $i++) { echo "<a href='pagination.php?page=".$i."'>".$i."</a> "; }; //make sure the page variable is set than check to see if the current iteration equals the page. If so just echo out the page # for ($i=1; $i<=$total_pages; $i++) { echo (isset($_GET['page']) && $i==$_GET['page']) ? "<span style='background-color:red;'>$i</span>" : "<a href='pagination.php?page=".$i."'>".$i."</a> "; }
  20. Alright, so I have a little project I'm trying to work on. I get handed an expenditure report every week, here are the pertinent fields. Table Name: project_data Project_Num | Employee | Expenditure_Type | Expenditure_Date | Hours | Revenue 123456 | John Doe | Labor - Straight | 2015-01-01 | 1.5 | 255.00 Now, there is no unique identifier in this data. What I want to create is a way the accounting team can import any file they want and it will reconcile the data with what is already in the database. I know how to do right outer joins with ID's to find the differences but I can't seem to figure out the most effective way to do this. Another think to keep in mind is an import can have up to 20,000 rows in it. So if I concatenate all the fields and check the strings I'm afraid it might be a little too slow. I'm thinking of creating a temporary table called: project_data_temp Storing the upload, then the next step is comparing the two tables to figure out what is different from both tables. All my searches on Google have come up with matching unique ids, whereas here there is no unique id. The only way I would know how to do it is to create a new column that concatenates these values in both tables and comparing them. Not sure how efficient that would be or if it is needed. Any help would be appreciated, thanks in advance.
  21. Just from a quick peak... on the landing page you are creating the $userid = $_SESSION['id']. On the project page you are changing the $_SESSION['id'] to $row['id'] which I assume is the row associated with the project. So when you hit the back button, the $userid is now different and picking up whatever ID was associated with the project from the project page. I think.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.